Score:0

ACL permissions set correctly but user still doesn't have access

us flag

I am trying to give access to a user named 'test' for a specific directory under /var/log, but not everything else under /var/.

I used the following commands:

sudo setfacl -R -m user:test:--- /var/
sudo setfacl -R -m user:test:rwx /var/log/test_dir/

getfacl shows that the permissions are set correctly:

# file: var/log/test_dir/
# owner: root
# group: root
user::rwx
user:test:rwx

# file: var
# owner: root
# group: root
user::rwx
user:test:---

However, when trying to ls the contents of test_dir or cat a file existing inside test_dir, it still says

ls: cannot access '/var/log/test_dir': Permission denied

It seems like somehow the first command still overrides the second?

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.