[Samba] patch request - inherit owner

Andrew Bartlett abartlet at samba.org
Sat Nov 26 07:13:44 GMT 2005


On Tue, 2005-11-22 at 06:00 -0700, Craig White wrote:
> On Tue, 2005-11-22 at 09:33 +0100, initiators at free.fr wrote:
> > Craig White wrote:
> > > On Mon, 2005-11-21 at 17:36 +0100, initiators at free.fr wrote:
> > > 
> > >>Gerald (Jerry) Carter wrote:
> > >>
> > >>>initiators at free.fr wrote:
> > >>>
> > >>>| so a patch to add an "inherit owner group" option
> > >>>| would be very useful.
> > >>>
> > >>>Unix file systems already support this with the group ID bit.
> > >>>Just "chmod g+s dirname".
> > >>
> > >>Ok it's working.
> > >>
> > >>I didn't knew I could have a s without a x, so I was worried about the
> > >>security as some users have access to a shell on the Samba server.
> > > 
> > > ----
> > > 'x' has different meaning when it comes to a directory. It indicates
> > > whether a user of that type can 'descend' into the directory.
> > > 
> > > Craig
> > > 
> > > 
> > 
> > I know this, but I am moving data from a Windows server to Samba i.e. I
> > have to copy files preserving the creation times and then set up the
> > access rights.
> > And as I tought that s goes with x, and there is not way (well, as least
> > from what I know) to recursievly set the s just to directories (as with
> > the X) I had no solution.
> ---
> chmod -R g+s /path/to/directory # recursively set guid bit
> ---

Watch out, that will set the setgid bit on any files in that directory.

Where 'foo' is the directory, try:

find foo -type d | xargs chmod g+s

-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Samba Developer, SuSE Labs, Novell Inc.        http://suse.de
Authentication Developer, Samba Team           http://samba.org
Student Network Administrator, Hawker College  http://hawkerc.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba/attachments/20051126/eb3153bd/attachment.bin


More information about the samba mailing list