Sharing Directory With Other Users

0
22

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.

  1. 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
  2. Same as above but only the owner of the file can delete it:
    • sudo chmod 1770 /home/Shared
  3. 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
  4. Same as 3, except only the owner of the file can delete it:
    • sudo chmod 3770 /home/Shared
Previous articleDesign Patterns – Transfer Object Pattern
Next articleSharing Windows Folder To Linux Virtual Box OS
Vishal Bhandari is an admin, editor and writer of this portfolio. He writes about himself, his interests, hobbies, activities. He manages many articles about tech, finance, history and geopolitics on his portfolio.

LEAVE A REPLY

Please enter your comment!
Please enter your name here