问题描述
我使用的是CentOS 6.9。我有启用了ACL的目录。我想查找所有未为组权限设置rxw
的目录。 ls -l
在组权限点中显示ACL掩码的事实使情况变得复杂。如果掩码设置为rxw
,则find
错误地认为组权限为rxw
。请参见下面的示例:
$ ls -l
total 0
drwx------ 2 user1 somegroup 4096 Aug 10 13:35 stuff
$ find . -type d ! -perm /g+x,g+w,g+r -print # Find all directories without rxw set for the group
./stuff
$ setfacl -m u:bob:rwx stuff/ # Set ACL for new user,mask is calculated.
$ ls -l # Mask displayed in group position
total 0
drwxrwx---+ 2 user1 somegroup 4096 Aug 10 13:35 stuff
$ getfacl stuff/ # Clearly,group permissions are still denied rxw
# file: stuff/
# owner: user1
# group: somegroup
user::rwx
user:bob:rwx
group::---
mask::rwx
other::---
$ find . -type d ! -perm /g+x,g+r -print # Should print `stuff` here because the group permissions haven't changed,just the ACL mask
$
问题
- 设置了ACL后,如何使用
find
来标识所有组权限为0(以八进制表示)的目录?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)