0

Now I have 3 users: x,y,z

and 3 folders a,b,c

I want to make user x have a full permission in the 3 folders and their containing files.

I want to make user y have write+read+execute permissions on b folder and its contents only

I want to make user z to have write+read+execute permission on c folder and its contents only

How I can do it?

2
  • Is this a homework question? – David Foerster Nov 17 '16 at 10:26
  • no I want to manage my small business shared network – Mahmoud Mo Nov 17 '16 at 10:28
0

For this we need to assume that x is member of group g and neither y nor z are member of that same group. Then we can set the (group) ownership and access permissions as follows:

chown -R x a
chown -R y:g b
chown -R z:g c

chmod -R u+rwX,go-rwx a
chmod -R ug+rwX,o-rwx b c

This removes the read and traversal permissions for all other users (aside from x, y, and z) on all three directories as well.

0

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.