This is similar to another question, but it does not seem like it explains the behavior I'm seeing. Below I am adding a specific user to get rx permissions on the Apache log access logs. However, even after adding the ACL, the ec2-user cannot cat the file.

[root]# setfacl -m u:ec2-user:rx /var/log/httpd/access_log-20170419
[root]# getfacl /var/log/httpd/access_log-20170419 
getfacl: Removing leading '/' from absolute path names
# file: var/log/httpd/access_log-20170419
# owner: root
# group: root user::rw- user:ec2-user:r-x group::r-- mask::r-x other::r--
[root]# exit 
$ whoami 
$ more /var/log/httpd/access_log-20170419         
/var/log/httpd/access_log-20170419: Permission denied

It looks like the ACL should take precedence.

  • What do you get if ec2-user types ls -l /var/log/httpd/? – ctrl-alt-delor Apr 20 '17 at 21:42

Check the permissions of /var/log/httpd. The permissions are probably only rwx------. You need to give ec2-user access to this directory using setfacl

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.