Permissions in GNU/Linux

Create a group

  • Create the shared group:
1
sudo groupadd shared

Add a user

  • Add user devops to the shared group:
1
sudo usermod -a -G shared devops

For the changes to take effect, you need to log out and log back in as the devops user. You can verify with the command:

1
groups

Change the group of a directory and its files

  • Change the group of the wiki directory to shared:
1
sudo chgrp -R shared wiki

Add write permissions for a group on a directory and its files

Add write w permissions for the user group on the wiki directory.

1
sudo chmod -R g+w wiki