Default group on file creation

On Suns, there are two possible ways that the group on a new file is determined. The method is determined by the state of the group ID bit on the directoy in which the file is being created.

If the group ID bit for the directory is off, the group used is a random selection (probably the last loginable group of the user) from the groups to which the user belongs.

If the group ID bit is set, the group for the file is taken from the directory in which the file is being created. In this case, it does not matter if the user is a member of that group.

To set the group ID bit on a directory,

     chmod g+s directory
To clear the group ID bit on a directory,
     chmod g-s directory

This page last updated September 17, 1995.