文件/目录权限尾随+(drwxr-xr-x +) [英] file/directory permissions trailing + ( drwxr-xr-x+ )
问题描述
我有一个具有奇怪权限的目录(drwxr-xr-x +)-尾随(+)作为第11个字符,这似乎迫使所有文件和子目录都具有rwxrwxrwx权限,以下是权限.
I have a directory with strange permissions ( drwxr-xr-x+ ) - trailing ( + ) as 11th character, which seems to force all the files and subdirectories to assume rwxrwxrwx permissions, Following is the permissions.
drwxr-x---+ 3 root root 4096 Dec 22 15:33 directory
我想摆脱此尾随(+).我已尝试关注.
I want to get rid of this trailing ( + ). I have tried following .
chmod 755 directory/
chmod a-x directory/
chmod u=rwx,g=rw,o=x directory/
我也尝试过以下方法:
sudo chmod u=rwx,g=rx,o-x,u-s,g-s directory/
任何帮助将不胜感激.谢谢-我被卡住了.
Any help will be appreciated . Thanks - I am stuck .
推荐答案
结尾的 +
表示在目录上设置了 ACL
(访问控制列表).
The trailing +
signify that ACL
, Access Control List, is set on the directory.
您可以使用 getfacl
来获取详细信息
You can use getfacl
to get the details
getfacl directory
以下输出来自 getfacl Codespace
,其具有由 setfacl -m u:umesh:rw Codespace
设置的ACL.这里 setfacl
授予用户 umesh
到 Codespace
目录的 rw
权限.
Following output is from getfacl Codespace
which have ACL set by setfacl -m u:umesh:rw Codespace
.
Here setfacl
is giving rw
permission to Codespace
directory for user umesh
.
# file: Codespace/
# owner: root
# group: root
user::rwx
user:umesh:rw-
group::r-x
mask::rwx
other::r-x
,例如,对于上述示例,我们可以使用 setfacl
删除 ACL
and we can remove the ACL
using setfacl
, for example, for the above sample
setfacl -x u:umesh Codespace/
有关 man setfacl
和 man getfacl
这篇关于文件/目录权限尾随+(drwxr-xr-x +)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!