Users can only copy/paste files when I set their permissions to 777.
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
Also note that a user's ENTIRE home directory should be private, not just one subdirectory contained within. Things can get screwy fast if users are allowed access to other users' home directories (for example, SSH keys will not work if other users have access to your home directory). It's MUCH better to set up a neutral 3rd location that they can both access for shared work.
Last edited by suicidaleggroll; 03-31-2017 at 12:11 PM.
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/
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...
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.