Create the shared folder
sudo mkdir /home/shared
Create the new user’s group
sudo addgroup newgroup
sudo groupadd newgroup // for suse
Change ownership of the shared folder to the new group
sudo chown :newgroup /home/Shared
Add your desired users to that group
sudo adduser my_user newgroup
usermod -a -G newgroup my_user // for suse
Repeat this for all users who are to be using this folder.
Giving Permissions to users in the group on the shared folder.
- All group users can add to and delete from the folder and can read and but not write to each others files:
sudo chmod 0770 /home/Shared
- Same as above but only the owner of the file can delete it:
sudo chmod 1770 /home/Shared
- All group users can add to and delete from the folder and can read and write to each other’s files:
sudo chmod 2770 /home/Shared
- Same as 3, except only the owner of the file can delete it:
sudo chmod 3770 /home/Shared