[Samba] File Permission Question

Istvan Sebestyen istvan at chains.ch
Thu Oct 30 09:33:40 GMT 2003

>     Got a little problem that I'm hoping somebody can help me solve.  I've
> got a samba server set as the office's file server.  We have a large common
> share that different people put documents in, and are to be modified by
> other people.  I need to setup samba so that when a new file is created it
> is writeable to the entire group, not just the person who created it.  Here
> is any example.

Well. You can use setgid for that. In case you don't know what it is,
i'd explain that.

Directory: /export/share/secret
Owner: foobar
Group: hhaynes

Now you set to the directory chmod 2770 /export/share/secret, this means
the directory has now the setgid flag.
This means, that all new files created in this directory will be owned
by the group hhaynes. The same thing with setuid, except that the owner
will be the current user of the setuid directory. I hope it's easy to
understand. Of course you can set both flags (setuid, setgid) on a


       (O O)

Istvan Sebestyen                                   <istvan at chains.ch>
What's the difference between chattr and chmod?
man chattr > 1; man chmod > 2; diff -u 1 2 | less

More information about the samba mailing list