Linux assigns the file permissions of the new file using your default UID and GID. To allow others access to the file, you need to either change the security permissions for the everyone security group or assign the file a different default group that contains other users.

This can be a pain in a large environment if you want to create and share documents among several people. Fortunately, there’s a simple solution for how to solve this problem.

There are three additional bits of information that Linux stores for each file and directory.

The set user id (SUID): When a file is executed by a user, the program runs under the permissions of the file owner.

The set group id (SGID): For a file, the program runs under the permissions of the file group. For a directory, new files created in the directory use the directory group as the default group.

The sticky bit: The file remains (sticks) in memory after the process ends.

The SGID bit is important for sharing files. By enabling the SGID bit, you can force all new files created in a shared directory to be owned by the directory’s group and now the individual user’s group.

The SGID is set using the chmod command. It’s added to the beginning of the standard three digit octal value (making a four-digit octal value), or you can use the symbol s in symbolic mode.

Trackback URI | Comments RSS

Leave a Reply

You must be logged in to post a comment.