1

I have looked and looked but cannot find a specific answer to this question: I have 3 users: A 'master' and 2 subordinates.

I want the master to be able to access the subordinates' folders, but I only want the subordinates to see their own home folders.

What is the best way to do this? It seems I can create multiple groups and include the master and respective subordinate, but that seems like a lot of extra 'overhead/administration'.

  • Please edit your question and i) tell us what operating system you are using and ii) define "access". Do you mean read access? Write? Both? Do you want these subordinate users to have no read access to anything but their own home directories (I don't think that's possible)? – terdon Jul 6 '16 at 16:57
  • Sorry - Open Suse 13. I want the master to be able to r w to the subordinates directories. I don't want the users to be able to read each others directories. – Tazman Jul 6 '16 at 17:14
  • Please edit your question to add extra information. It is hard to read and easy to miss in the comments. Also, comments can be deleted with no warning. – terdon Jul 6 '16 at 17:15
  • Create a group with the 'master' (but not the subs) as member, and make that group the group owner of the home directories. Then chmod 0770 etc. That, or ACL:s. Though I think in both cases the subs can mess up the permissions if they own the directories. – ilkkachu Jul 6 '16 at 17:15
1

People will need access outside of their home directory (e.g. into /bin and /usr/bin) to run normal programs... unless you plan on creating massive chroot jails for each user! (I don't recommend that).

If you only care about those three home directories then a simple solution would be to chmod 700 the three home directories so that only each user can access them. Then for the two subordinates you can setfacl -m u:master:rwx on those two home directories. Now the "master" user will have access to all three directories.

  • regarding the first part of your reply, yes, you are correct. And that makes sense. I should clarify that the folders are used by the master to upload files via FTP and then accessed or downloaded by the subordinates. The rest of the folder(s) permissions will remain the same. I will try the solution and see if that works for what I need. Thanks. – Tazman Jul 6 '16 at 17:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.