Jacob Friis Larsen
2004-Jul-06 14:42 UTC
[Samba] Windows users can create files but Linux users can not?
I have a Samba server running on a Fedora Core 1 Linux server, and my problem is that Windows users can create files but Linux users can not. This is my smb.conf file: [global] workgroup = IDG_DK server string = WebDev log file = /var/log/samba/%m.log max log size = 50 [jfl] path = /var/www/websites/jfl valid users = jfl read only = No Thanks, Jacob
Jacob Friis Larsen
2004-Jul-09 11:51 UTC
[Samba] Windows users can create files but Linux users can not?
john.nelson@teradyne.com wrote:>>I have a Samba server running on a Fedora Core 1 Linux server, and my >>problem is that Windows users can create files but Linux users can not. >>This is my smb.conf file on the Samba server:>> >>[global] >> workgroup = IDG_DK >> server string = WebDev >> log file = /var/log/samba/%m.log >> max log size = 50 >> >>[jfl] >> path = /var/www/websites/jfl >> valid users = jfl >> read only = No > > > I'm confused by your question. Did you leave out part of the smb.conf > file? Did you leave out part of the question?No.> Given the information > you've given, user "jfl" should have read-write access to \\webdev\jfl, > and no one else should have any access. This is true whether you are > connecting from a Windows system or another Linux system.I can read and change files, but not create new files or dirs.> I'm not sure in what context "Linux users" cannot create files. ARe you > using smbfs or cifs to connect from one Linux system to another? Is the > connection being made as user "jfl"? Are the smbfs/cifs parameters set up > right?I am using smbfs. I connect via /etc/fstab like this: //fedora.idg.dk/jfl /mnt/jfl smbfs username=jfl,password=xxx 0 0> Or are you saying that Linux users logged on to this system cannot create > files in /var/www/websites/jfl? If so, that sounds like a matter of > filesystem permissions.If I login to the server via ssh as jfl I can create files and dirs. When I try via the share i get "Access denied to /mnt/jfl/test" This is my smb.conf on my Linux client: [global] workgroup = IDG_DK server string = %h server (Samba %v) obey pam restrictions = Yes passdb backend = tdbsam, guest passwd program = /usr/bin/passwd %u passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n . syslog = 0 log file = /var/log/samba/log.%m max log size = 1000 dns proxy = No panic action = /usr/share/samba/panic-action %d invalid users = root [homes] comment = Home Directories create mask = 0700 directory mask = 0700 browseable = No [printers] comment = All Printers path = /tmp create mask = 0700 printable = Yes browseable = No [print$] comment = Printer Drivers path = /var/lib/samba/printers Thanks, Jacob
Jacob Friis Larsen
2004-Jul-09 14:17 UTC
[Samba] Windows users can create files but Linux users can not?
> I still think the problem has to do with the way you are using smbfs. I > suspect that you have mounted the remote filesystem in such a way that the > account you are using does not have write access. > > After you mount this filesystem, do a "ls -ld /mnt/jfl". What is the > result?jfl@debidg:~$ ls -ld /mnt/jfl drwxr-xr-x 1 root root 4096 Jul 9 13:31 /mnt/jfl When I create a dir as root, it works, but when I try to delete it I get "rm: cannot remove directory `test': Device or resource busy"> Does it appear that the current user (whoever it is) has > appropriate unix filesystem permissions? In other words, if you are > running as user "jfl", is the directory /mnt/jfl "owned" by jfl, and/or is > there group or other write permission?When nothing is mounted at /mnt/jfl it is owned by jfl. When mounted it is owned by root. I think it is because I need to tell fstab that ordinary users can mount the drive. Could that be it? If so how do I do that?> Remember, smbfs does not actually map the remote filesystem's file > ownership and permision information onto the client system (with the > exception of read-only permission) - you have to specify the apparent > owner and group and access mask at mount time. Truthfully, Smbfs is a > LOUSY way to do unix to unix filesystem sharing.How do I do this? Thanks, Jacob
Jacob Friis Larsen
2004-Jul-12 05:55 UTC
[Samba] Windows users can create files but Linux users can not?
>>When mounted it is owned by root. > > Right. This was my point. Because of the way you mounted the filesystem, > user "jfl" has no write access. It really has nothing to do with the > server (or "Samba"). > > However, I understand that there are "uid=" and "gid=" options for the smb > filesystem type that allow you to configure the way the filesystem appears > to local users. I don't know if there's an easier way.I have not tested it yet, as I currently do not have access to the computer, but will test it in a couple of days. This article mentions the same problem and your solution: http://www.justlinux.com/nhf/Filesystems/Mounting_smbfs_Shares_Permanently.html Thanks a lot for your help. Jacob