linux – 谁可以更改ACL权限?

我正在使用ACL来控制对不同Apache实例和不同管理员组的Web的各个根的访问.我有一个Unix组admins-web22用于特定网站的管理员,而用户apache-web22用于特定的apache实例.这些是在Web的根目录上设置的权限:

# file: web22
# owner: root
# group: root
user::rwx
user:apache-web22:r-x
group::rwx
group:webmaster:rwx
group:admins-web22:rwx
mask::rwx
other::---
default:user::rwx
default:user:apache-web22:r-x
default:group::rwx
default:group:admins-web22:rwx
default:mask::rwx
default:other::r-x

有一个用户fred是admins-web22的成员.该用户具有对目录的完全读写访问权限(如上所述).这工作正常.但是,此用户无法为某些文件和目录授予用户apache-web22写入权限,这很重要(例如,Web管理员希望为Drupal设置上载目录). setfacl命令给出“不允许操作”.

我的问题是,谁可以使用setfacl授予权限,我怎样才能让group admins-web22的用户自己更改权限(对于apache-web22)?

我正在运行Debian Wheezy,如果它很重要的话,它是一个ext4分区.

解决方法:

setfacl手册页说明了谁可以授予权限:

The file owner and processes capable of CAP_FOWNER are granted the right to modify ACLs of a file. This is analogous to the permissions required for accessing the file mode. (On current Linux systems, root is the only user with the CAP_FOWNER capability.)

所以fred只能对他拥有的文件使用setfacl.根据您的确切安全要求,您可以允许admins-web22的成员运行setfacl作为apache-web22(使用sudo),这将允许他们更改apache-web22所拥有的文件的ACL ….

上一篇:远程连接MySql


下一篇:PostgreSQL的Access control lists