Dar*_*ane 123 linux shell permissions selinux
我在 Linux 下的目录中的一些文件在.
权限列表的末尾有一个。
-rw-r--r--
?chmod
?小智 46
我有同样的问题。我花了一段时间才找到这个,浏览了“man ls”页面一百次(好吧,也许不是那么频繁),直到我终于看到了 SEE ALSO 部分中关于使用命令的注释:
info coreutils 'ls invocation'
Run Code Online (Sandbox Code Playgroud)
在描述“-l”(--format=long)的部分中:
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.
Run Code Online (Sandbox Code Playgroud)
小智 14
这是 SELinux 上下文。尝试ls -Z /your/file
引用我的 man ls
Run Code Online (Sandbox Code Playgroud)SELinux options: --lcontext Display security context. Enable -l. Lines will probably be too wide for most displays. -Z, --context Display security context so it fits on most displays. Displays only mode, user, group, security context and file name. --scontext Display only security context and file name.
要改变这种情况,请尝试以下命令之一:chcon
或semanage fcontext
或restorecon
这里解释得很清楚:https : //access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security-Enhanced_Linux/sect-Security-Enhanced_Linux-Working_with_SELinux-SELinux_Contexts_Labeling_Files.html
小智 11
这意味着该文件具有 SELinux 的访问列表。查看此主题,它告诉您如何允许您编辑/更改文件http://ubuntuforums.org/showthread.php?t=1315684
归档时间: |
|
查看次数: |
135381 次 |
最近记录: |