Debian Codegraph @

upstream/debian-unstable/man1/chcon.1

raw
1 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.50.1.
2 .TH CHCON "1" "February 2026" "GNU coreutils 9.10" "User Commands"
3 .SH NAME
4 chcon \- change file security context
5 .SH SYNOPSIS
6 .B chcon
7 [\fI\,OPTION\/\fR]... \fI\,CONTEXT FILE\/\fR...
8 .br
9 .B chcon
10 [\fI\,OPTION\/\fR]... [\fI\,-u USER\/\fR] [\fI\,-r ROLE\/\fR] [\fI\,-l RANGE\/\fR] [\fI\,-t TYPE\/\fR] \fI\,FILE\/\fR...
11 .br
12 .B chcon
13 [\fI\,OPTION\/\fR]... \fI\,--reference=RFILE FILE\/\fR...
14 .SH DESCRIPTION
15 .\" Add any additional description here
16 .PP
17 Change the SELinux security context of each FILE to CONTEXT.
18 With \fB\-\-reference\fR, change the security context of each FILE to that of RFILE.
19 .PP
20 Mandatory arguments to long options are mandatory for short options too.
21 .TP
22 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chcon--dereference'\fB\-\-dereference\fP\X'tty: link'
23 affect the referent of each symbolic link (this is
24 the default), rather than the symbolic link itself
25 .TP
26 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chcon-h'\fB\-h, \-\-no\-dereference\fP\X'tty: link'
27 affect symbolic links instead of any referenced file
28 .TP
29 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chcon-u'\fB\-u, \-\-user=\,USER\fP\X'tty: link'\/\fR
30 set user USER in the target security context
31 .TP
32 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chcon-r'\fB\-r, \-\-role=\,ROLE\fP\X'tty: link'\/\fR
33 set role ROLE in the target security context
34 .TP
35 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chcon-t'\fB\-t, \-\-type=\,TYPE\fP\X'tty: link'\/\fR
36 set type TYPE in the target security context
37 .TP
38 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chcon-l'\fB\-l, \-\-range=\,RANGE\fP\X'tty: link'\/\fR
39 set range RANGE in the target security context
40 .TP
41 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chcon--no-preserve-root'\fB\-\-no\-preserve\-root\fP\X'tty: link'
42 do not treat '/' specially (the default)
43 .TP
44 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chcon--preserve-root'\fB\-\-preserve\-root\fP\X'tty: link'
45 fail to operate recursively on '/'
46 .TP
47 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chcon--reference'\fB\-\-reference=RFILE\fP\X'tty: link'
48 use RFILE's security context rather than specifying a CONTEXT value
49 .TP
50 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chcon-R'\fB\-R, \-\-recursive\fP\X'tty: link'
51 operate on files and directories recursively
52 .TP
53 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chcon-v'\fB\-v, \-\-verbose\fP\X'tty: link'
54 output a diagnostic for every file processed
55 .PP
56 The following options modify how a hierarchy is traversed when the \fB\-R\fR
57 option is also specified. If more than one is specified, only the final
58 one takes effect. \fB\-P\fR is the default.
59 .TP
60 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chcon-H'\fB\-H\fP\X'tty: link'
61 if a command line argument is a symlink to a directory, traverse it
62 .TP
63 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chcon-L'\fB\-L\fP\X'tty: link'
64 traverse every symbolic link to a directory encountered
65 .TP
66 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chcon-P'\fB\-P\fP\X'tty: link'
67 do not traverse any symbolic links
68 .TP
69 \X'tty: link https://www.gnu.org/software/coreutils/chcon#chcon--help'\fB\-\-help\fP\X'tty: link'
70 display this help and exit
71 .TP
72 \X'tty: link https://www.gnu.org/software/coreutils/chcon#chcon--version'\fB\-\-version\fP\X'tty: link'
73 output version information and exit
74 .SH AUTHOR
75 Written by Russell Coker and Jim Meyering.
76 .SH "REPORTING BUGS"
77 Report bugs to: bug\[email protected]
78 .br
79 GNU coreutils home page: <https://www.gnu.org/software/coreutils/>
80 .br
81 General help using GNU software: <https://www.gnu.org/gethelp/>
82 .br
83 Report any translation bugs to <https://translationproject.org/team/>
84 .SH "SEE ALSO"
85 Full documentation <https://www.gnu.org/software/coreutils/chcon>
86 .br
87 or available locally via: info \(aq(coreutils) chcon invocation\(aq
88 .PP
89 .br
90 Packaged by Debian (9.10\-1)
91 .br
92 Copyright \(co 2026 Free Software Foundation, Inc.
93 .br
94 License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
95 .br
96 This is free software: you are free to change and redistribute it.
97 .br
98 There is NO WARRANTY, to the extent permitted by law.