[Samba] Samba and LinuxMDK 9 file perms oddities?

AlF ddkh at libero.it
Sat Mar 1 13:08:23 GMT 2003


Hi all

I noticed a pretty strange behaviour regarding file permissions that 
sometimes change without any reason. I need to share the following two 
directories:

    /home/public (owner=root, group=root, perms=0777)
    /home/users (owner=root, group=users, perms=0770)

the /home directory is owned by root, the group is root and permissions 
are set in this way: 0755.
The above dirs are shared using these instructions in smb.conf:

[grp]
    comment = Folder for group [%g]
    path = /home/%g
    guest ok = no
    public = no
    browseable = yes
    writable = yes
    create mask = 0660
    directory mask = 0770

[public]
    comment = Public folder
    path = /home/public
    guest ok = no
    public = no
    browseable = yes
    writable = yes
    create mask = 0666
    directory mask = 0777

When a member of group "users" connects to the [public] or [grp] share 
and interacts with them by creating dirs and/or files, something strange 
happens because file permissions change to:

    /home/public (owner=root, group=root, perms=0755)
    /home/users (owner=root, group=users, perms=0750)

In a short words, the write flag disappears. As a result, the next time 
that a user logs in or interacts with shares, he won't be able to write 
files, create dirs, rename them and so on.
I tried to shut down and restart samba to discover if that change is 
caused by the deamon itself and not by the use of the shares but I 
observed that restarting doesn't change file perms. Does anybody know 
the solution?

Thanks :-)




More information about the samba mailing list