Administering user accounts

Setting the group ID for file creation in a directory

By default, the GID (group identifier) of a newly created file is set to the GID of the creating process or user. Setting the SGID bit on a directory causes all subsequent new files to take the GID of that directory. This makes it easier for users to share files, because it ensures that all files have the same GID, even if the users do not have the same login group.

To set the SGID bit on a directory, use this command, substituting the directory name for directory:

chmod g+s directory

To remove the bit, replace the ``+'' with a ``-'' in the chmod(1) command.


Next topic: Changing the limit on simultaneous group membership
Previous topic: Removing a group

© 1999 The Santa Cruz Operation, Inc. All rights reserved.
UnixWare 7 Release 7.1.1 - 5 November 1999