132 lines
4.1 KiB
HTML
132 lines
4.1 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of CHCON</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>CHCON</H1>
|
|
Section: User Commands (1)<BR>Updated: September 2019<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
chcon - change file security context
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>chcon</B>
|
|
|
|
[<I>,OPTION/</I>]... <I>,CONTEXT FILE/</I>...
|
|
<BR>
|
|
|
|
<B>chcon</B>
|
|
|
|
[<I>,OPTION/</I>]... [<I>,-u USER/</I>] [<I>,-r ROLE/</I>] [<I>,-l RANGE/</I>] [<I>,-t TYPE/</I>] <I>,FILE/</I>...
|
|
<BR>
|
|
|
|
<B>chcon</B>
|
|
|
|
[<I>,OPTION/</I>]... <I>,--reference=RFILE FILE/</I>...
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
|
|
<P>
|
|
|
|
Change the SELinux security context of each FILE to CONTEXT.
|
|
With <B>--reference</B>, change the security context of each FILE to that of RFILE.
|
|
<P>
|
|
|
|
Mandatory arguments to long options are mandatory for short options too.
|
|
<DL COMPACT>
|
|
<DT id="1"><B>--dereference</B><DD>
|
|
affect the referent of each symbolic link (this is
|
|
the default), rather than the symbolic link itself
|
|
<DT id="2"><B>-h</B>, <B>--no-dereference</B><DD>
|
|
affect symbolic links instead of any referenced file
|
|
<DT id="3"><B>-u</B>, <B>--user</B>=<I>,USER/</I><DD>
|
|
set user USER in the target security context
|
|
<DT id="4"><B>-r</B>, <B>--role</B>=<I>,ROLE/</I><DD>
|
|
set role ROLE in the target security context
|
|
<DT id="5"><B>-t</B>, <B>--type</B>=<I>,TYPE/</I><DD>
|
|
set type TYPE in the target security context
|
|
<DT id="6"><B>-l</B>, <B>--range</B>=<I>,RANGE/</I><DD>
|
|
set range RANGE in the target security context
|
|
<DT id="7"><B>--no-preserve-root</B><DD>
|
|
do not treat '/' specially (the default)
|
|
<DT id="8"><B>--preserve-root</B><DD>
|
|
fail to operate recursively on '/'
|
|
<DT id="9"><B>--reference</B>=<I>,RFILE/</I><DD>
|
|
use RFILE's security context rather than specifying
|
|
a CONTEXT value
|
|
<DT id="10"><B>-R</B>, <B>--recursive</B><DD>
|
|
operate on files and directories recursively
|
|
<DT id="11"><B>-v</B>, <B>--verbose</B><DD>
|
|
output a diagnostic for every file processed
|
|
</DL>
|
|
<P>
|
|
|
|
The following options modify how a hierarchy is traversed when the <B>-R</B>
|
|
option is also specified. If more than one is specified, only the final
|
|
one takes effect.
|
|
<DL COMPACT>
|
|
<DT id="12"><B>-H</B><DD>
|
|
if a command line argument is a symbolic link
|
|
to a directory, traverse it
|
|
<DT id="13"><B>-L</B><DD>
|
|
traverse every symbolic link to a directory
|
|
encountered
|
|
<DT id="14"><B>-P</B><DD>
|
|
do not traverse any symbolic links (default)
|
|
<DT id="15"><B>--help</B><DD>
|
|
display this help and exit
|
|
<DT id="16"><B>--version</B><DD>
|
|
output version information and exit
|
|
</DL>
|
|
<A NAME="lbAE"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
Written by Russell Coker and Jim Meyering.
|
|
<A NAME="lbAF"> </A>
|
|
<H2>REPORTING BUGS</H2>
|
|
|
|
GNU coreutils online help: <<A HREF="https://www.gnu.org/software/coreutils/">https://www.gnu.org/software/coreutils/</A>>
|
|
<BR>
|
|
|
|
Report chcon translation bugs to <<A HREF="https://translationproject.org/team/">https://translationproject.org/team/</A>>
|
|
<A NAME="lbAG"> </A>
|
|
<H2>COPYRIGHT</H2>
|
|
|
|
Copyright © 2018 Free Software Foundation, Inc.
|
|
License GPLv3+: GNU GPL version 3 or later <<A HREF="https://gnu.org/licenses/gpl.html">https://gnu.org/licenses/gpl.html</A>>.
|
|
<BR>
|
|
|
|
This is free software: you are free to change and redistribute it.
|
|
There is NO WARRANTY, to the extent permitted by law.
|
|
<A NAME="lbAH"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
Full documentation at: <<A HREF="https://www.gnu.org/software/coreutils/chcon">https://www.gnu.org/software/coreutils/chcon</A>>
|
|
<BR>
|
|
|
|
or available locally via: info '(coreutils) chcon invocation'
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="17"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="18"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="19"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="20"><A HREF="#lbAE">AUTHOR</A><DD>
|
|
<DT id="21"><A HREF="#lbAF">REPORTING BUGS</A><DD>
|
|
<DT id="22"><A HREF="#lbAG">COPYRIGHT</A><DD>
|
|
<DT id="23"><A HREF="#lbAH">SEE ALSO</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:08 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|