-   Linux - Software (
-   -   Samba and permissions (

Phaethar 03-29-2004 10:36 AM

Samba and permissions
Hey all,

I'm having some permissions issues with a Samba share on a remote system. I have a folder shared via Samba, and in the smb.conf file I'm giving full permissions to valid users (by group). On the system connecting, I have made the proper fstab entries so that I'm effectively mounting the shares on bootup. Everything works fine as far as that goes, but the permissions are always being set to 755, and the owner is always root. I need to change this to allow other users (apache) to be able to write to the share as well. But, no matter what I've tried, I can't change the permissions from the machine that's connected. What I've tried:

- Give full permissions on the source machine to all users
- Give full permissions on the mount folder on the connecting machine (changes on bootup though)
- Give full permissions in the smb.conf file
- Tried to to a chmod as the root user on the connecting machine (get operation not permitted.. even though it's owned by root)

So, I'm a bit stuck here, and need to get this working. Is there an option in the fstab entry perhaps that could set this? Is it something else in samba? Any suggestions or advice would be greatly appreciated.


Quick edit: Both systems are running Fedora on ext3 filesystems. I can post config files as needed also.

kvedaa 06-16-2004 09:55 PM

I realize that it has been a long time since you posted this problem, but I have an idea that might be worth looking into, if this problem is still affecting you. If you go to the directory that has the files in question and then run:

lsattr *

lsattr is a tool that list file attributes, if any attributes are listed for these files it may well restrict your ablity to modify these files. To see the definitions of the given attributes, you can 'man chattr' which has breif discriptions of the various attributes that you might see.

Phaethar 06-17-2004 08:03 AM

Hey Kvedaa,

If I remember correctly, this was a Samba issue where permissions weren't assigned correctly when another Linux system tried to mount the shared drive. What I had to do was set the permissions (and users if need be) in the fstab file itself. So, if I wanted to mount a samba share automatically, my fstab entry might look like this:


//servername/share /mountpoint smbfs uid=500,gid=500,fmask=777,dmask=777,credentials=/home/user/.smbpasswd 0 0
I like using the smbpasswd file as well (or some other name) as that way I don't have to put the username and password in the fstab file.

Using this method, I'm able to mount Samba shares from other Linux partitions with whatever permissions I want.

It would be interesting to see what attributes lsattr would show when mounting a share with the default settings...

All times are GMT -5. The time now is 08:23 PM.