0

I'm trying to make it so that different users have different permissions for certain directories. For example user Bob has access to read, write, and execute the directory of /configuration, but Alice can only read and write, and lastly Eve is denied access. This is just one example of a directory. The group is called employees.

All of the employees are all under one group however when I use setfacl to make it so that Bob has full permission, then Alice and Eve are also gained full access.

Full permission table:

Directories BOB EVE ALICE
configuration rwx r rw
executable rwx - rw
logs rw r -
4
  • I need a little more information to help here: 1. Which user owns the directory and which group owns the directory currently? 2. What are the user, group, and other permissions on the directory? Also note that when adding an ACL, it will match the user first and if there is no user, it will go on to match a group. Just because Bob is the only ACL you added doesn't mean the other two won't match the default group. Let me know if you have any more info or if this helped! Commented Mar 12, 2022 at 1:25
  • I removed group access for all the directories shown so that I can manually add them in using 'setfacl'. The reason why they are in a group is so they can have access to the outside directory which holds these directories in the example. Then I manually used 'setfacl' to give Bob and Alice permissions, whilst leaving out Eve. Eve still ended up having permissions and Alice was never restricted to 'rw'. I hope this can help because I'm finding it hard to explain it completely hence the table. I cannot find any specific examples of such cases online, I'm using StackedExchange as a last attempt
    – Phenom
    Commented Mar 12, 2022 at 1:39
  • 1
    Please post the commands you use, and the output of commands like ls -l and getfacl. Commented Mar 12, 2022 at 3:45
  • This edit doesn't match the description you gave for a now-deleted answer. In the comment you refer to permissions on files. Here you are talking about permissions on directories without regard to the files themselves. I think it would be better if you actually described what actions you want each person to be able to do, and let us recommend permissions to achieve that aim Commented Mar 12, 2022 at 7:32

1 Answer 1

0
# As root
mkdir /configuration /executable /logs
chmod 700 /configuration /executable /logs

setfacl u:Bob:rwx,u:Eve:r,u:Alice:rw /configuration
setfacl u:Bob:rwx,u:Alice:rw /executable
setfacl u:Bob:rw,u:Eve:r /logs

I should point out that just a r or rw permission only on a directory is not going to be very useful unless you have very specific requirements in mind.

You must log in to answer this question.

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