大网数据广告活动
服务器运维问答

Have new files inherit their folder's extended ACLs

· 52CE 我爱测

We are moving our web files from AFS to a local volume with the acl flag set. We use extended ACLs for our permissions so users can edit different parts of our websites. In AFS, when you create a new file it inherits its parent's…

问题原文

原帖链接 · Vacation9 · CC BY-SA 3.0

We are moving our web files from AFS to a local volume with the acl flag set. We use extended ACLs for our permissions so users can edit different parts of our websites. In AFS, when you create a new file it inherits its parent's permissions.

How do we make it so that when users create new files in their web directories, those files inherit the parent's facl? (Which includes www-data) If it helps, we run Gentoo Linux.

已采纳解答

原帖链接 · c4f4t0r · CC BY-SA 4.0

On Linux, many filesystems support posix acl.

If you have many directories and you want to apply the acls on subdirs

 -R, --recursive
       Apply operations to all files and directories recursively. This option cannot be mixed with ‘--restore’.

But if you want the acl are apply on files and directories on creation time, you need the defaults acls on directory

 setfacl -d -m user:user01:rwx dir

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2013-11-22)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0 / CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。