1CHCON(1)                         User Commands                        CHCON(1)
2
3
4

NAME

6       chcon - change file SELinux security context
7

SYNOPSIS

9       chcon [OPTION]... CONTEXT FILE...
10       chcon [OPTION]... [-u USER] [-r ROLE] [-l RANGE] [-t TYPE] FILE...
11       chcon [OPTION]... --reference=RFILE FILE...
12

DESCRIPTION

14       Change  the  SELinux  security  context  of each FILE to CONTEXT.  With
15       --reference, change the security context of each FILE to that of RFILE.
16
17       Mandatory arguments to long options are  mandatory  for  short  options
18       too.
19
20       --dereference
21              affect the referent of each symbolic link (this is the default),
22              rather than the symbolic link itself
23
24       -h, --no-dereference
25              affect symbolic links instead of any referenced file
26
27       -u, --user=USER
28              set user USER in the target security context
29
30       -r, --role=ROLE
31              set role ROLE in the target security context
32
33       -t, --type=TYPE
34              set type TYPE in the target security context
35
36       -l, --range=RANGE
37              set range RANGE in the target security context
38
39       --no-preserve-root
40              do not treat '/' specially (the default)
41
42       --preserve-root
43              fail to operate recursively on '/'
44
45       --reference=RFILE
46              use RFILE's security context rather than  specifying  a  CONTEXT
47              value
48
49       -R, --recursive
50              operate on files and directories recursively
51
52       -v, --verbose
53              output a diagnostic for every file processed
54
55       The  following  options modify how a hierarchy is traversed when the -R
56       option is also specified.  If more than  one  is  specified,  only  the
57       final one takes effect.
58
59       -H     if  a  command  line argument is a symbolic link to a directory,
60              traverse it
61
62       -L     traverse every symbolic link to a directory encountered
63
64       -P     do not traverse any symbolic links (default)
65
66       --help display this help and exit
67
68       --version
69              output version information and exit
70
71       GNU  coreutils  online  help:  <http://www.gnu.org/software/coreutils/>
72       Report chcon translation bugs to <http://translationproject.org/team/>
73

AUTHOR

75       Written by Russell Coker and Jim Meyering.
76
78       Copyright  ©  2013  Free Software Foundation, Inc.  License GPLv3+: GNU
79       GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
80       This is free software: you are free  to  change  and  redistribute  it.
81       There is NO WARRANTY, to the extent permitted by law.
82

SEE ALSO

84       The full documentation for chcon is maintained as a Texinfo manual.  If
85       the info and chcon programs are properly installed at  your  site,  the
86       command
87
88              info coreutils 'chcon invocation'
89
90       should give you access to the complete manual.
91
92
93
94GNU coreutils 8.22               October 2018                         CHCON(1)
Impressum