And, if a directory has the 'sgid' flag enabled, any filesystem objects created
inside it will inherit the group of the directory. This particular feature comes
in handy when you need to create a directory tree to be used by a group of people
that all belong to the same group. Simply do this:
# mkdir /home/groupspace
# chgrp mygroup /home/groupspace
# chmod g+s /home/groupspace
Now, any users in the group mygroup can create files or
directories inside /home/groupspace and they will be automatically
assigned a group ownership of mygroup as well. Depending on the
users' umask setting, new filesystem objects may or may not be readable,
writable or executable by other members of the mygroup group.