对于我正在进行的项目,我需要www-data用户能够读取/etc/openvpn/easy/pki/index.txt。
为此,权限可以查看:
-rw-r-----+ 1 root www-data 1050 Dec 7 20:43 index.txt
那不起作用,所以我加入了ACL。
getfacl index.txt
# file: index.txt
# owner: root
# group: www-data
user::rw-
user:www-data:r--
group::r--
mask::r--
other::---
不管怎么说,都不管用。一定是我做错什么了吧?
sudo -u www-data ls index.txt
ls: cannot access 'index.txt': Permission denied
发布于 2020-12-15 01:12:18
您还需要检查包含目录和所有父目录的权限,这至少必须允许该用户获得x
搜索权限,以便访问该目录中的文件或目录(如果需要读取目录列表,则需要r
权限)。
https://serverfault.com/questions/1046172
复制相似问题