[Samba] Create masks set to 770 yet new files created as 750

Michael Heydon michaelh at jaswin.com.au
Tue Jun 24 23:49:49 GMT 2008



Jeff L wrote:
> <snip>
> The masks on each share is :
>
> browseable = yes
> writeable = yes
> create mask = 2770
> security mask = 2770
> directory mask = 2770
> directory security mask = 2770
>
> I've also performed a chmod -R 2770 on the entire share dir.
>
> if I add 
>
> force create mode = 2770
> force directory mode = 2770
>
> to each share the new files are created as 770. 
>
> Is this nessesary? I thought the create masks would be sufficient.
> <snip>
>   
Yes it is. From the smb.conf man page: 

          [The] resulting  UNIX  mode  is then bit-wise 'AND'ed with 
this parameter.
          This parameter may be thought of as a bit-wise  MASK  for  
the  UNIX
          modes of a file. **Any bit not set here will be removed from 
the modes
          set on a file when it is created.**

So the masks define which bits CAN be set, the force modes define which 
bits WILL be set.

*Michael Heydon - IT Administrator *
michaelh at jaswin.com.au <mailto:michaelh at jaswin.com.au>




More information about the samba mailing list