[Samba] Permissions of new files on samba with other read on.

Jeremy Allison jra at samba.org
Fri Jun 12 20:37:15 GMT 2009


On Fri, Jun 12, 2009 at 04:33:07PM -0400, simo wrote:
> On Fri, 2009-06-12 at 13:06 -0700, Jeremy Allison wrote:
> > On Fri, Jun 12, 2009 at 09:21:57AM +0200, Daniele Palumbo wrote:
> > > hi.
> > > 
> > > I have troubles of global readable bit on new file created on samba.
> > > I wish to have a 660 permission on new files, instead i've got 664.
> > > 
> > > also, if i create an empty files it will get 644 permmission, instead of 660.
> > > 
> > > directory creation instead seems fine.
> > > 
> > > Below my environmnent and tests.
> > > pointing to samba docs or bugs, open or closed, are REALLY welcome.
> > 
> > My guess is the client is resetting the mode after
> > the file is created. "create mask" only applies to new
> > files. Set the "security mask"/"force security mode" parameters
> > to control mode setting on existing files.
> 
> Jeremy this is the known issue with cifs.ko, using open and then a
> separate setfile operation to set mode, instead of just a posix open.
> 
> It should be fixed in recent kernels hopefully.

I know, all I'm saying is that if you really want to
enforce permissions, however the files are manipulated,
you need to use the "security mask"/"force security mode" parameters.

Jeremy.


More information about the samba mailing list