I own a particular file on a Linux system. I would like to give 2 groups (accounting, shipping) read access and only read access, and 3 users(Mike, Raj and Wally) write access and only write access.
How can I accomplish this?
|
I own a particular file on a Linux system. I would like to give 2 groups (accounting, shipping) read access and only read access, and 3 users(Mike, Raj and Wally) write access and only write access. How can I accomplish this? | |||||||||||
feedback
|
This question came from our site for professional and enthusiast programmers.
|
I suggest using POSIX ACLs (Access Control Lists). Your filesystem must support them / have the acl option enabled, but if it does, then your problem simplifies to:
And you can do that for arbitrary sets of permissions. | |||
|
feedback
|
|
group read access, specify the second bit as 4, but what is that 3 users ?
write to user, read to group. | |||
feedback
|
|
If you have 2 groups A,B and 3 users x,y,z first give the correct ownership: for the group:
for the user
then change permissions:
| |||||||||||
feedback
|