Users can only copy/paste files when I set their permissions to 777.
We are trying to set up two users, bob and mary, and both home directories have permissions of drwxr-xr-x. bob is assigned to user group bob,clark, and mary is assigned to user group mary,clark. Admin is clark.
We cannot figure out how to allow bob and mary to copy/paste files and directories inside their respective home directories. mary and bob each have private folders in their home directories that we have been trying to set permissions for. We want bob and mary to each be able to read and write to their own private folders. When we set the private folders permissions to 775, the contents are not writable. In fact, after trying many combinations, 777 is the only permission that will allow bob and mary to copy/paste within their private folders. Everyone says don't use 777, so we are confused. The command we are using from root in admin is chmod -R 775 /home/bob/Bob for example, Where Bob is the private folder. We are using Mint 18.1 Cinnamon on a pc, on one hard drive. |
Welcome.
It's a little trickier with group permissions that it ought to be. It comes up often enough that I've written about how it can be done: https://www.linuxquestions.org/quest...e-users-37043/ That's aimed at a different directory, but you can definitely apply the technique to home directories. |
Please post the output of:
Code:
id bob |
When you say private folder you certainly mean shared or public folder.
Shared folders must have a group that is common to both users and 775 permission. It can be a common primary group in passwd or a secondary group in group. In addition an g+s bit makes sense so ls -ld shows drwxrwsr-x. (The g+s bit enforces the common group for new files.) Best practice is to have project directories outside of /home/ - e.g. in /proj/ |
Hi SuicidalEggroll
bob@office ~ $ id bob uid=1002(bob) gid=1002(bob) groups=1002(bob),1000(clark) bob@office ~ $ ls -ld /home/bob /home/bob/Bob drwxr-xr-x 21 bob clark 4096 Mar 31 12:29 /home/bob drwxrwxrwx 39 bob clark 4096 Feb 26 15:04 /home/bob/Bob bob@office ~ $ A common area for shared work is a great idea. I will look into that. Thanks... |
Hi-Ya holadebob
suicidaleggroll is right, it's not a good idea for users to go into each others home directories to read/write stuff. Instead create shared folder(s) for others to collaborate like adding, modifying the contents of the shared folders. This is easily done by the traditional permission scheme of groups, folder and group ownership and directory permissions. There is also another method of doing this called ACL Access control List. A more fine tune type of permissions scheme. Here is a short ten minute youtube video on ACL usage. https://www.youtube.com/watch?v=6piQXXHTmqk It's very simple to do. |
All times are GMT -5. The time now is 09:05 AM. |