[Samba] group and user permissions are not initially set

Daniel Ericsson dae at darkisland.se
Sun Jan 1 11:01:20 MST 2012


I encountered a bug where permissions are not initially set, I search on 
Google have resulted in that there are a few others that have the same 
problem but no one have been able to come up with a solution yet. It 
does not matter what parameters I send to chmod since after the file is 
created the permissions are correctly enforced.

The result of this following commands are
touch Private/test; ls -lah Private/test; chmod u+x Private/test; ls 
-lah Private/test; rm Private/test
-rwxr-xr-x 1 myuser mygroup 0 2012-01-01 18:54 Private/test
-rwxrwxrwx 1 myuser mygroup 0 2012-01-01 18:54 Private/test

This is a snippet of the share from testparm -v

     path = /archive/Private
     read only = No
     create mask = 0777
     force create mode = 0777
     force security mode = 0777
     directory mask = 0777
     force directory mode = 0777
     force directory security mode = 0777

# mount.cifs -V
mount.cifs version: 5.0

# uname -a
Linux fractal 3.0.0-14-generic #23-Ubuntu SMP Mon Nov 21 20:28:43 UTC 
2011 x86_64 x86_64 x86_64 GNU/Linux

# smbd -V
Version 3.5.11

I am mounting the share with the following options
mount -o credentials=/home/myuser/.cifscredentials,iocharset=utf8 -t 
cifs // Private/

Thankful for any help regarding this,

More information about the samba mailing list