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? Nov 17, 2016 at 10:26
  • no I want to manage my small business shared network
    – Mahmoud Mo
    Nov 17, 2016 at 10:28

1 Answer 1

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .