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