I just set up a basic nginx server on my Debian 7.0 server. The config file /etc/nginx/nginx.conf is barely modified, and begings with:user www-data; # nginx shall run as user `www-data`I then set up a server configuration (file /etc/nginx/sites-available/filenamehere), which includes the following directives:root /home/diti/wwwaccess_log /home/diti/logs/access.log;I executed setfacl so that nginx can read all data in /home/ directories, and createdthe file /home/diti/logs/access.log as a regular user (username is diti).$ whoamiditi$ groups ditiditi : diti$ ls -lh /home/diti/logs/access.logtotal 12K-rw-r-x---+ 1 www-data diti 8.9K Mar 13 16:47 access.log$ tail /home/diti/logs/access.logtail: cannot open `access.log' for reading: Permission denied$ getfacl /home/diti/logs/access.loggetfacl: Removing leading '/' from absolute path names# file: home/diti/logs/access.log# owner: www-data# group: ditiuser::rw-user:www-data:r-xgroup::---mask::r-xother::---How comes I am not able to read the log file, owned by www-data:diti? I should be able to, since I (diti) belong to group diti, and group permissions for the log file are set to r-x.Is it because of ACL? My filesystem is ext4.
Not allowed to read a file with correct group permissions? ACL?
permissions;acl
getfacl shows you that the group does not have any permission.The ls output -rw-r-x---+ is confusing. It does not mean that the group has these permissions but that someone specific and different from the owner has it.