What does the dot at the end of the permissions in the output of “ls -lah” mean?

丶灬走出姿态 提交于 2019-11-27 22:37:57

问题


I found some Linux files, and when I type ls -lah, it outputs this permissions format:

... 
drwxr-xr-x.  2 root    root  
...
-rw-rw-r--.  1 root    root 
...

I would like to know, what is the meaning of the dot (-rw-rw-r--.) at the end of the permissions format?


回答1:


From info coreutils 'ls invocation' under Linux

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.




回答2:


From GNU.org under what information is listed:

GNU ls uses a ‘.’ character to indicate a file with a SELinux security context, but no other alternate access method.

This basically implies that the file has an Access Control List (ACL) with SELinux. You can set or delete ACL association for a file by using the setfacl command




回答3:


According to the Filesystem permissions wiki page, the dot indicates a SELinux context is present.



来源:https://stackoverflow.com/questions/30594871/what-does-the-dot-at-the-end-of-the-permissions-in-the-output-of-ls-lah-mean

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!