linux_wiki:create_and_configure_set-gid_directories_for_collaboration

This is an old revision of the document!


Create And Configure Set-gid Directories For Collaboration

General Information

About this page/how-to/script.


When files are created in a directory with set-GID, the new files inherit the group ownership of that directory.

Example scenario: There are three departments that have data folders for storage. (Finance, IT, and Management) They would like all files created in each of their folders to have the same group ownership for easy department file editing.

The directories

  • /data/financial-docs
  • /data/it-scripts
  • /data/manager-reports

The group names:

  • finance
  • it
  • managers

Each group owns their respective directory

chown :finance /data/financial-docs
chown :it /data/it-scripts
chown :managers /data/manager-reports

Change the group set-GID bit to achieve the requirement in the scenario

chmod g+s /data/financial-docs
chmod g+s /data/it-scripts
chmod g+s /data/manager-reports

Remove Permissions from all others

chmod o-rwx /data/financial-docs
chmod o-rwx /data/it-scripts
chmod o-rwx /data/manager-reports

  • linux_wiki/create_and_configure_set-gid_directories_for_collaboration.1456799937.txt.gz
  • Last modified: 2019/05/25 23:50
  • (external edit)