[root@hadoop1 hadoop-2.7.2]# chcon --help
Usage: chcon [OPTION]... CONTEXT FILE...
or: chcon [OPTION]... [-u USER] [-r ROLE] [-l RANGE] [-t TYPE] FILE...
or: chcon [OPTION]... --reference=RFILE FILE...
Change the security context of each FILE to CONTEXT.
-c, --changes like verbose but report only when a change is made
-h, --no-dereference affect symbolic links instead of any referenced file
(available only on systems with lchown system call)
-f, --silent, --quiet suppress most error messages
--reference=RFILE use RFILE's context instead of using a CONTEXT value
-u, --user=USER set user USER in the target security context
-r, --role=ROLE set role ROLE in the target security context
-t, --type=TYPE set type TYPE in the target security context
-l, --range=RANGE set range RANGE in the target security context
-R, --recursive ch
Linux chcon:修改文件安全上下文(security context)
最新推荐文章于 2024-02-23 11:10:30 发布
博客介绍了Linux中`chcon`命令的用途,主要用于修改文件的安全上下文,该操作通常与SELinux相关。在安装特定软件如JDK7时,可能需要使用`chcon`来解决权限问题。
摘要由CSDN通过智能技术生成