Create a new group like “DevOps” and add the desire users to the group.
sudo groupadd devops
Now since group is created, let’s add users to the group.
sudo usermod -a -G devops peter sudo usermod -a -G devops jens
Now all that’s left is to set the permissions on the directory:
sudo chgrp -R devops /path/to/the/directory sudo chmod -R 770 /path/to/the/directory
Now only these two members of the devops group can read, write, or execute anything within the directory. Note the -R argument to the chmod and chgrp commands: this tells them to recurse into every sub directory of the target directory and modify every file and directory it finds.