[Samba] applying permissions to subdirectories using setgid doesn't do th e trick... :(

mourik jan c heupink heupink at fastmail.fm
Tue Feb 10 17:15:04 GMT 2004


Gerald (Jerry) Carter wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Heupink, Mourik Jan C. wrote:
>
> | Using force user etc in smb.conf is not an option (afaik)
> | because that only applies to a top level directory, and not to
> | deeper directories, right..? (please do correct me if i'm
> | wrong here already....)
>
> force user applies to all file reads/writes anywhere within
> that share.
>
> You might also want to look at 'inherit permissions' in
> smb.conf(5).

Yes, but what I mean is that I want the force user to only start deeper 
in the share. So, NOT from the top share... (and this is not possible, 
afaik)

Here is what I did now, (and that seems to work beautifully)
I've set create mask and directory mask to 0770, set the top level 
directories to the appropriate group ownerships, and set the setgid bit 
(or how do you say that...)

Example:
project +--> project1 (group is called project1)
        |--> project2 (group is called project2)
        +--> project3 (group is called project3)

this results in all files owned by the person who created them, and the 
group is the right group for that directory.

This seems to do exactly what I want. Am I overseeing something, or I am 
right..?

Just wanted to to say that i've spent this entire day playing around 
with samba, and had a great time doing so. :)

mourik jan


More information about the samba mailing list