Samba Connecting, cannot transfer files
James Dugger
james.dugger at gmail.com
Fri Jul 31 20:54:57 MST 2015
If you are looking for a fast way to get VirtualBox VM's up and running for
LAMP development you should install and look into using Vagrant. It is a
provisioner which uses Ruby to automatically build VM's in VirtualBox. I
have a simple setup of provisioning scripts that stand up LAMP servers
using Vagrant. Feel free to use it, or make it your own.
https://github.com/netwidget/vagrant_dev_lamp
On Fri, Jul 31, 2015 at 7:42 PM, James Dugger <james.dugger at gmail.com>
wrote:
> Virtualbox has a plugin called Guest Additions which is an iso that you
> can download, and configure to add file sharing capabilities between the
> guest VM and the host system. You can then mount a host folder and it will
> show up as a native folder on the VM. While this is convenient and fairly
> easy to use it has a few draw backs. It can be slow to access and some
> have reported file corruption issues when there are a large amount of
> files and subfolders in the share. This may not be an issue for you
> depending on use case.
>
> I use VirtualBox VM's as LAMP servers for local development and test
> environments for my web application projects. One Drupal project had 1+GB
> of core/module/templates and custom templates in it. Using Guest Additions
> to share the document root folder of the project with my MacBook Pro core
> i5 with 8 GB proved to be slow for the VM to render the site in my test
> browsers (upwards of 10 - 20 seconds sometimes). The fastest/simplest
> share setup was to use an NFS mount in the VM.
>
> If your file sharing use case is for Web development you may find that
> samba is not any faster (even when you get it working) and may be slower
> than Guest Additions (GA). Just an FYI. I only use Samba as a fileserver
> (NAS) when I have to have the share accessible to Windows, Mac, and Linux
> machines. There are other options besides NFS that offer more security and
> more features for mission critical production file sharing, but if your use
> case is simple local web development/testing NFS is (I think) the simplest
> to implement. and faster than GA or Samba.
>
> Just my 2 cents.
>
> On Fri, Jul 31, 2015 at 6:50 PM, Keith Smith <techlists at phpcoderusa.com>
> wrote:
>
>>
>> Not on both. Interesting on the "Vm writable" = yes does not show.
>>
>> There was a couple differences. The VN mirrors the one that works.
>> restarted nmb and smb and still cannot write files. While I was
>> researching this issue today I found that others were complaining about not
>> being able to write to guest VM's on VirtualBox, Linux to Linux.
>>
>> I also found a reference that said VirtualBox has a way to to file
>> transfers. I need to read it. Maybe this week end... I have other thing
>> that need my attention. Sure would like to find an answer. I think it is
>> a VirtualBox thing.
>>
>>
>> Thank you for all your ideas and help!!
>>
>> Keith
>>
>>
>>
>>
>>
>>
>>
>> On 2015-07-31 18:22, James Dugger wrote:
>>
>>> Have you run testparm from the command line on both of your samba
>>> servers to see what is different between the servers
>>>
>>> On Fri, Jul 31, 2015 at 2:04 PM, Keith Smith
>>> <techlists at phpcoderusa.com> wrote:
>>>
>>> I modified my valid user to correspond to yours.
>>>>
>>>> [work]
>>>> path = /work
>>>> browsable = yes
>>>> writable = yes
>>>> read only = no
>>>> valid users = @keith +keith
>>>> write list = keith
>>>>
>>>> The workstation runs Mint 17 KDE
>>>>
>>>> The Samba share is on a VirtualBox guest running CentOS 6.6.
>>>>
>>>> Permissions on the share are set to world writeable (777). The
>>>> directories created by using Dolphin are 755 but no files can be
>>>> added via Dolphin.
>>>>
>>>> Owner is keith:keith
>>>>
>>>> Both the host and the Samba have a user keith and same password.
>>>>
>>>> Please note I have another Samba box on my network with a different
>>>> IP and mount point. Same user and password. This other Samba share
>>>> is working fine and is connected to by the fstab.
>>>>
>>>> On 2015-07-31 12:48, James Dugger wrote:
>>>>
>>>> I am assuming that you've checked the ownership of the files and
>>>> folders to ensure that user 'keith' and group 'keith' existing and
>>>> are
>>>> assigned correctly. If you are using the group keith, have you
>>>> added
>>>> the following line to your share in samba:
>>>>
>>>> valid users = @keith +keith
>>>> The @ symbol indicates a group and a + indicates a samba username
>>>> to
>>>> add to the share. If the username 'keith' has been added to the
>>>> group
>>>> named 'keith' in /etc/group and the group ownership of all files
>>>> and
>>>> folders is listed as keith, than you should only need:
>>>> valid users = @keith
>>>> and it should be working.
>>>>
>>>> If the ownership of the group is not correct. from the parent
>>>> directory of the share folder you may want to do:
>>>> chown -R keith:keith <share_folder>/
>>>>
>>>> On Fri, Jul 31, 2015 at 11:38 AM, Keith Smith
>>>> <techlists at phpcoderusa.com> wrote:
>>>>
>>>> Thanks James!
>>>>
>>>> It mounts OK and I can create directories, just cannot upload
>>>> files.
>>>>
>>>> On 2015-07-31 11:24, James Dugger wrote:
>>>>
>>>> Have you checked for any conflicts in the options portion in the
>>>> mount statement of the drive where the share is located in the
>>>> fstab
>>>> file of the samba server ... with the mount statement on the samba
>>>> client box? Your cifs mount statement calls for the username
>>>> option.
>>>> , does the mount statement for the drive where the file being
>>>> shared on the server allow this user name option?
>>>>
>>>>
>>>>
>>>> I'm mounting the actual drive on my samba server as ext4 with
>>>> defaults. I am mounting the share on two mac boxes using cifs.
>>>> My shares are used for backup not daily rw activity.
>>>>
>>>> Are you mounting using cifs ?
>>>>
>>>> My share is in CentOS 6.6 and my desktop is Mint 17 kde.
>>>>
>>>> I have a samba server on a LAMP dev box and it mounds just fine
>>>> using
>>>> cifs with the mount command being in the fstab.
>>>>
>>>> I wonder if there is a conflix between the two boxes or if there
>>>> is
>>>> something I am missing.
>>>>
>>>> I spun up a minimul CentOS VM and can ping etc. Turned off
>>>> SElinux
>>>> and IPTables. Installed and configured Samba and the same thing is
>>>> happening.
>>>>
>>>> I can connect and brows just not upload files. I can even create
>>>> directories.
>>>>
>>>> I set the share to 0777.
>>>>
>>>> Could this be a VM thing?
>>>>
>>>> On 2015-07-26 19:01, James Dugger wrote:
>>>>
>>>> I set up my own share declaration at the end of the smb.conf file.
>>>> For example I have a simple one called [archive] that allows
>>>> backups
>>>> to be placed on a server running Ubuntu 15.04 server edition.
>>>>
>>>> I create the samba users and passwords for each user (these match
>>>> their unix user accounts)
>>>> I set the appropriate unix permissions for the group that I want
>>>> typically 775.
>>>> I create a group called "archive" in /etc/group and then add all
>>>> of
>>>> the users who are to have access to it into the archive group.
>>>> the valid users = @group_name is the key that allows samba to
>>>> control
>>>> the access to samba share.
>>>>
>>>> The key is add the the users to the group in /etc/group and to make
>>>> sure that they have a mapped samba username and password.
>>>>
>>>> [archive]
>>>> comment = backup drive
>>>> path = /srv/archive
>>>> browseable = yes
>>>> guest ok = no
>>>> valid users = @archive
>>>>
>>>> There are other options but I usually find that the I forget to
>>>> update
>>>> the /etc/group file.
>>>>
>>>> Hope that helps
>>>>
>>>> On Sun, Jul 26, 2015 at 11:33 AM, Keith Smith
>>>> <techlists at phpcoderusa.com> wrote:
>>>>
>>>> Thanks for the link.
>>>>
>>>> My smbpasswd is in /usr/bin/smbpasswd
>>>>
>>>> Just to make sure I : touch /etc/samba/smbpasswd
>>>>
>>>> then I :
>>>> smbpasswd -x username
>>>> smbpasswd -a username
>>>>
>>>> still same issue.
>>>>
>>>> Remove /etc/samba/smbpasswd
>>>>
>>>> I've created several directories off of /work/ on the samba
>>>> server
>>>> using the Samba server's command line. Using Dolphin on my
>>>> desktop
>>>> I can add directories to /work/ - they have correct permissions
>>>> and
>>>> ownership. However I get a permissions dialog when adding files
>>>> to
>>>> /work/
>>>>
>>>> If I try to add a file to one of those directories I created
>>>> using
>>>> Dolphin on my desktop there is no error and no file shows up.
>>>>
>>>> Thank you for your help!!
>>>> Keith
>>>>
>>>> On 2015-07-26 10:28, Stephen Partington wrote:
>>>>
>>>>
>>>>
>>> http://www.linuxquestions.org/questions/linux-newbie-8/samba-smbpasswd-file-missing-750367/
>>>
>>>> [1]
>>>>
>>>> [4]
>>>>
>>>> [3]
>>>>
>>>> [1]
>>>> [3]
>>>>
>>>> On Sun, Jul 26, 2015 at 10:22 AM, Keith Smith
>>>> <techlists at phpcoderusa.com> wrote:
>>>>
>>>> Thanks!! I added the Samba user as one of the first steps. My
>>>> smb.config shows "passdb backend = tdbsam". I cannot find the
>>>> tdbsam file. What am I missing?
>>>>
>>>> On 2015-07-26 09:56, Todd Millecam wrote:
>>>>
>>>> If I remember right, samba doesn't follow regular *nix
>>>> permissions.
>>>> Try running the command:
>>>> smbadduser
>>>>
>>>> to get your user name and password in. Use those credentials when
>>>> you
>>>> login to transfer files and see if it works.
>>>>
>>>> On Sun, Jul 26, 2015 at 10:18 AM, Keith Smith
>>>> <techlists at phpcoderusa.com> wrote:
>>>>
>>>> Hi,
>>>>
>>>> I am running Mint 17 KDE. I've uploaded Virtualbox and created a
>>>> vm using CentOS 6.6. On the CentOS 6.6 VM I installed Samba.
>>>>
>>>> I created a user on the VM and created the same user as a Samba
>>>> user.
>>>> I created a directory off root : /work
>>>> smb and nmb are both running.
>>>> in the /etc/samba/smb.conf I:
>>>> 1) set the workgroup - I do not think this is necessary since I
>>>> am
>>>> connection from Linux.
>>>> 2) commented out all the cups references
>>>> 3) added the following lines:
>>>>
>>>> - path = /work
>>>> - writable = yes
>>>> - browseable = yes
>>>> - read only = no
>>>>
>>>> SELinux is disables
>>>> IPTables is disabled
>>>>
>>>> I have the exact same config on a laptop running CentOS 6.6 and
>>>> it
>>>> works fine. Only difference is the laptop mounts and connects to
>>>> Samba from the fstab.
>>>>
>>>> To connect to the Samba share on the VM I issue the following
>>>> command from my desktop's command line:
>>>>
>>>> sudo mount -t cifs -o user='username' //192.168.20.51/work/ [2] [1]
>>>>
>>>> [1]
>>>>
>>>> [2] [1]
>>>> [1]
>>>>
>>>> /mnt/centos6 (command line on my desktop)
>>>>
>>>> It mounts and I can view the /work directory in Dolphin on the
>>>> the
>>>> parent (mint 17 KDE desktop).
>>>>
>>>> I cannot upload files though.
>>>>
>>>> To test I : chmod -R 777 /work which did not help.
>>>>
>>>> I checked the Samba logs and they contain almost nothing - no
>>>> errors are being logged.
>>>>
>>>> I've scoured the internet and am finding no solution.
>>>>
>>>> Tied:
>>>>
>>>> create mask = 0755
>>>> create mode = 0660
>>>> directory mode = 0770
>>>> force create mode = 0660
>>>> force directory mode = 0770
>>>> force user = keith
>>>> force group = keith
>>>>
>>>> which did not make a difference.
>>>>
>>>> Any ideas are much appreciated.
>>>>
>>>> Thanks!!
>>>> Keith
>>>>
>>>> --
>>>> Keith Smith
>>>> ---------------------------------------------------
>>>> PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
>>>> To subscribe, unsubscribe, or to change your mail settings:
>>>> http://lists.phxlinux.org/mailman/listinfo/plug-discuss [3] [2] [2]
>>>> [3]
>>>> [2] [2]
>>>>
>>>> --
>>>>
>>>> Todd Millecam
>>>>
>>>> Links:
>>>> ------
>>>> [1] http://192.168.20.51/work/ [2] [1] [1] [2] [1]
>>>> [2] http://lists.phxlinux.org/mailman/listinfo/plug-discuss [3] [2]
>>>> [2]
>>>> [3] [2]
>>>>
>>>> ---------------------------------------------------
>>>> PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
>>>> To subscribe, unsubscribe, or to change your mail settings:
>>>> http://lists.phxlinux.org/mailman/listinfo/plug-discuss [3] [2] [2]
>>>> [3]
>>>> [2]
>>>>
>>>> --
>>>> Keith Smith
>>>> ---------------------------------------------------
>>>> PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
>>>> To subscribe, unsubscribe, or to change your mail settings:
>>>> http://lists.phxlinux.org/mailman/listinfo/plug-discuss [3] [2] [2]
>>>> [3]
>>>> [2]
>>>>
>>>> --
>>>>
>>>> A mouse trap, placed on top of your alarm clock, will prevent you
>>>> from
>>>> rolling over and going back to sleep after you hit the snooze
>>>> button.
>>>>
>>>> Stephen
>>>>
>>>> Links:
>>>> ------
>>>> [1] http://192.168.20.51/work/ [2] [1] [1] [2]
>>>> [2] http://lists.phxlinux.org/mailman/listinfo/plug-discuss [3] [2]
>>>> [2]
>>>> [3]
>>>> [3]
>>>>
>>>
>>>
>>>
>>> http://www.linuxquestions.org/questions/linux-newbie-8/samba-smbpasswd-file-missing-750367/
>>> [1]
>>> [4]
>>>
>>> [3]
>>>>
>>>> [1]
>>>>>
>>>>> ---------------------------------------------------
>>>>> PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
>>>>> To subscribe, unsubscribe, or to change your mail settings:
>>>>> http://lists.phxlinux.org/mailman/listinfo/plug-discuss [3] [2]
>>>>> [2]
>>>>> [3]
>>>>>
>>>>
>>>> --
>>>> Keith Smith
>>>> ---------------------------------------------------
>>>> PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
>>>> To subscribe, unsubscribe, or to change your mail settings:
>>>> http://lists.phxlinux.org/mailman/listinfo/plug-discuss [3] [2] [2]
>>>> [3]
>>>>
>>>> --
>>>>
>>>> James
>>>>
>>>> LINKEDIN [4]
>>>>
>>>> Links:
>>>> ------
>>>> [1]
>>>>
>>>
>>>
>>>
>>> http://www.linuxquestions.org/questions/linux-newbie-8/samba-smbpasswd-file-missing-750367/
>>> [1]
>>> [4]
>>>
>>> [3]
>>>> [2] http://192.168.20.51/work/ [2] [1] [1]
>>>> [3] http://lists.phxlinux.org/mailman/listinfo/plug-discuss [3] [2]
>>>> [2]
>>>> [4] http://www.linkedin.com/pub/james-h-dugger/15/64b/74a/ [4] [3]
>>>> [4]
>>>>
>>>> ---------------------------------------------------
>>>> PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
>>>> To subscribe, unsubscribe, or to change your mail settings:
>>>> http://lists.phxlinux.org/mailman/listinfo/plug-discuss [3] [2] [2]
>>>>
>>>
>>> --
>>> Keith Smith
>>> ---------------------------------------------------
>>> PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
>>> To subscribe, unsubscribe, or to change your mail settings:
>>> http://lists.phxlinux.org/mailman/listinfo/plug-discuss [3] [2] [2]
>>>
>>> Links:
>>> ------
>>> [1] http://192.168.20.51/work/ [2] [1]
>>> [2] http://lists.phxlinux.org/mailman/listinfo/plug-discuss [3] [2]
>>> [3]
>>>
>>>
>>>
>>> http://www.linuxquestions.org/questions/linux-newbie-8/samba-smbpasswd-file-missing-750367/
>>> [1]
>>> [4]
>>> [4] http://www.linkedin.com/pub/james-h-dugger/15/64b/74a/ [4] [3]
>>>
>>> ---------------------------------------------------
>>> PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
>>> To subscribe, unsubscribe, or to change your mail settings:
>>> http://lists.phxlinux.org/mailman/listinfo/plug-discuss [3] [2]
>>>
>>> --
>>> Keith Smith
>>> ---------------------------------------------------
>>> PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
>>> To subscribe, unsubscribe, or to change your mail settings:
>>> http://lists.phxlinux.org/mailman/listinfo/plug-discuss [3] [2]
>>>
>>> --
>>>
>>> James
>>>
>>> LINKEDIN [3]
>>>
>>> Links:
>>> ------
>>> [1] http://192.168.20.51/work/ [2]
>>> [2] http://lists.phxlinux.org/mailman/listinfo/plug-discuss [3]
>>> [3] http://www.linkedin.com/pub/james-h-dugger/15/64b/74a/ [4]
>>> [4]
>>>
>>>
>>> http://www.linuxquestions.org/questions/linux-newbie-8/samba-smbpasswd-file-missing-750367/
>>> [1]
>>>
>>> ---------------------------------------------------
>>> PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
>>> To subscribe, unsubscribe, or to change your mail settings:
>>> http://lists.phxlinux.org/mailman/listinfo/plug-discuss [3]
>>>
>>> --
>>> Keith Smith
>>> ---------------------------------------------------
>>> PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
>>> To subscribe, unsubscribe, or to change your mail settings:
>>> http://lists.phxlinux.org/mailman/listinfo/plug-discuss [3]
>>>
>>> --
>>>
>>> James
>>>
>>> LINKEDIN [4]
>>>
>>>
>>> Links:
>>> ------
>>> [1]
>>>
>>> http://www.linuxquestions.org/questions/linux-newbie-8/samba-smbpasswd-file-missing-750367/
>>> [2] http://192.168.20.51/work/
>>> [3] http://lists.phxlinux.org/mailman/listinfo/plug-discuss
>>> [4] http://www.linkedin.com/pub/james-h-dugger/15/64b/74a/
>>>
>>> ---------------------------------------------------
>>> PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
>>> To subscribe, unsubscribe, or to change your mail settings:
>>> http://lists.phxlinux.org/mailman/listinfo/plug-discuss
>>>
>>
>> --
>> Keith Smith
>> ---------------------------------------------------
>> PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
>> To subscribe, unsubscribe, or to change your mail settings:
>> http://lists.phxlinux.org/mailman/listinfo/plug-discuss
>>
>
>
>
> --
> James
>
> *Linkedin <http://www.linkedin.com/pub/james-h-dugger/15/64b/74a/>*
>
--
James
*Linkedin <http://www.linkedin.com/pub/james-h-dugger/15/64b/74a/>*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.phxlinux.org/pipermail/plug-discuss/attachments/20150731/daffac9c/attachment.html>
More information about the PLUG-discuss
mailing list