诺亚方舟

沉淀

Linux文件权限属性后面的点的含义

$info coreutils ‘ls invocation’
Following the file mode bits is a single character that specifies whether an alternate access method such as an access control list applies to the file. When the character following the file mode bits is a space, there is no alternate access method. When it is
a printing character, then there is such a method.
在文件权限位后面,附加有一个单字符。用来表示是否有一个可替换的访问控制措施应用在这个文件上。例如,访问控制列表(ACL,access control list)。
当文件权限位后面附加的是一个空格时,表示系统没有可替换的访问控制措施。
当是一个可打印字符时,表示系统存在这样一个访问控制措施。

GNU ‘ls’ uses a ‘.’ character to indicate a file with an SELinux security context, but no other alternate access method.
GNU的ls命令使用 ‘.’字符表示文件使用了SELinux安全上下文,但是没有使用其他的访问控制措施。

A file with any other combination of alternate access methods is marked with a ‘+’ character.
一个文件结合了其他访问控制措施,文件用‘+’字符标记 。(如:ACL)

一个文件就算没有SELinux上下文,只用应用ACL,也能标记成‘+’字符。

一个文件有SELinux上下文,也有ACL,也标记成‘+’字符。
例如:

# ll -Z
-rw-r–r–  root root ?                                a.file  #没有SElinux上下文,没有ACL
-rw-r–r–+ root root ?                                b.file  #只有ACL,没有SElinux上下文
-rw——-. root root system_u:object_r:admin_home_t:s0 my.cnf #只有SElinux上下文,没有ACL
-rw-rw-r–+ root root unconfined_u:object_r:user_tmp_t:s0 dd.c #有SElinux上下文,有ACL

转载自:Linux文件权限属性后面的点的含义(ls -l)

发表评论

电子邮件地址不会被公开。 必填项已用*标注

您可以使用这些HTML标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>