Subject: Re: group perms
To: None <netbsd-users@netbsd.org>
From: Eric Fox <eric@bsdsystems.com>
List: netbsd-users
Date: 05/16/2006 19:17:38
What you want to do is set the SGID bit either 'chmod g+s dirname' or, 
numerically, add 2000 to your numeric permissions, i.e.: for directory 
permissions of 775, use chmod to set the permissions to 2775 so the SGID 
bit is set, which should cause all new files and subdirectories to 
inherit the group ownership.

  /\---/\  Eric J Fox
 /  o o  \ Small Business Computer Support
 \.\   /./ in the Phoenix Metropolitan Area
    \@/    http://www.bsdsystems.com/support/

Malcolm Herbert wrote:

>This is not something I tend to do a lot of, which is why I'm scratching
>my head here ...
>
>I have the situation where I have created a group of users in /etc/group
>and want them to all be able to read/write/destroy each others' files in
>the directory set aside for them.
>
>I seem to recall that some flavours of Un*x allow permissions to be
>set on a directory in such a way that group rights are inherited by
>files created by other members of a group in that directory, but I can't
>remember the magic to get that working ... any ideas?
>
>For some reason I am thinking that the sticky bit might be the key, but
>if I add it to the directory, nothing appears to happen - reading up on
>it seems to indicate that it just prevents others from deleting a file
>if set, which is nothing like what I'm after ...
>
>I've previously been fudging this by using samba to force a particular
>share to be treated as a particular user, but that doesn't work for me
>any more as our situation has changed ... so far my only ideas are a
>regular chmod -R on the affected directory which seems like too much of
>a hack to me ...
>
>Regards,
>Malcolm
>
>