我在“ls -l”的输出中发现了一个我不理解的权限字符:
[root@gnurr ~]# ls -l /etc/cron.daily/
total 32
-rwxr-xr-x 1 root root 265 Sep 10 16:04 0logwatch
-rwxr-xr-x. 1 root root 118 Aug 17 12:21 cups
文件“cups”的标准权限字符后有句点,但文件“0logwatch”则没有
我到处都发现了很多这样的点——它们也出现在目录或软链接(soft link)中,但它们似乎永远不会出现在我自己创建的文件中。
我发现一些帖子在这个位置提到了“@”或“+”,意思是“扩展属性”或“扩展安全信息”,但没有提到“.”。
有人知道点是什么意思吗?
最佳答案
来自信息/手册页:
GNU 'ls' uses a '.' character to indicate a file with an SELinux security context, but no other alternate access method.
整个部分还提到了一个'+',这是相关的:
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.
GNU 'ls' uses a '.' character to indicate a file with an SELinux security context, but no other alternate access method.
A file with any other combination of alternate access methods is marked with a '+' character.
关于bash - 文件权限中的句点是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21132446/