[Samba] Samba 3.6.15 Not honouring create mode

Jeremy Allison jra at samba.org
Thu Sep 26 12:18:12 MDT 2013


On Thu, Sep 26, 2013 at 12:08:39PM -0500, Taylor, Jonn wrote:
> Using samba 3 as cluster share for many years now and we now need to
> for the create mode on files. This seems to not be working in3.6.15.
> 
> [share]
>     comment = Share Data
>     path = /clustershare/share
>     force user = root
>     force group = Domain Admins
>     read only = No
>     force create mode = 660
>     force directory mode = 770
>     vfs objects = recycle
>     recycle:directory_mode = 770
>     recycle:versions = yes
>     recycle:keeptree = yes
>     recycle:noversions = *.doc|*.xls|*.ppt
>     recycle:excludedir = /tmp|/temp|/cache
>     recycle:exclude = *.tmp|*.temp|*.o|*.obj|~$*|*.~??|~*.tmp
>     recycle:repository = .recycle
> 
> 
> After a file or directory is created this is what I get.
> 
> drwxrwx--- 28 root domain admins      2048 Sep 26 11:57 .
> drwxr-xr-x  8 root root               3864 May  7 21:00 ..
> drwxrwxr-x  2 root domain admins      3864 Sep 26 11:57 test
> -rwxrw-r--  1 root domain admins         0 Sep 26 12:03 test.txt

You're using it wrong. "force create mode" is in minimal
set of bits you'll get on a create. You're getting
those. You want to add "create mask" to remove the
bits you don't want.

Remember also that the client can always come along
after create and change the mode bits also.

Jeremy.


More information about the samba mailing list