Like most things with Linux simple questions often result in complex answers - and in this case it all depends on what you mean by "shared"
Let's say you create a folder: /home/Shared
The following configurations will allow multiple users to add to and delete from the shared folder.
This will allow all users to add to the folder:
Code:
sudo chmod 0777 /home/Shared
This will restrict it to only members of the plugdev group:
Code:
sudo chmod 0770 /home/Shared
sudo chown :plugdev
sudo gpasswd -a morbius plugdev
The last command adds morbius to the plugdev group.
If you want users to be able to do the above and also to edit the files contained within that shared folder things get a bit more complicated.
This will allow all users of the plugdev group add/delete access to the folder and edit access to any new files created in or copied to the folder:
Code:
sudo chmod 2770 /home/Shared
sudo chown :plugdev /home/Shared
Note: What it will not do is affect any files moved to the shared folder. For that you need bindfs.
Another Note: If you are using Ubuntu13.10 you will unfortunately have to make one correction to the system:
EDIT: I had to edit this post since on a fresh install of 13.10 even this didn't work correctly. It looks like in 13.10 you will need to use bindfs if you want to edit the contents of a shared directory.
Last Note: You can also add a "sticky bit" to these that will prevent one user from deleting a file owned by another which I can explain if desired.
Bookmarks