chcon
Change SELinux security context of a file or files/directories. See also:
secon,restorecon,semanage fcontext. More information: https://www.gnu.org/software/coreutils/manual/html_node/chcon-invocation.html.
- View security context of a file:
ls
- Change the security context of a target file, using a reference file:
chcon --reference
- Change the full SELinux security context of a file:
chcon :::
- Change only the user part of SELinux security context:
chcon
- Change only the role part of SELinux security context:
chcon
- Change only the type part of SELinux security context:
chcon
- Change only the range/level part of SELinux security context:
chcon
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
