man-pages/man1/dpkg-statoverride.1.html
2021-03-31 01:06:50 +01:00

236 lines
6.7 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of dpkg-statoverride</TITLE>
</HEAD><BODY>
<H1>dpkg-statoverride</H1>
Section: dpkg suite (1)<BR>Updated: 2020-03-23<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
dpkg-statoverride - override ownership and mode of files
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<B>dpkg-statoverride</B>
[<I>option</I>...] <I>command</I>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
"<B>stat overrides</B>" are a way to tell
<B><A HREF="/cgi-bin/man/man2html?1+dpkg">dpkg</A></B>(1)
to use a different owner
or mode for a path when a package is installed (this applies to any
filesystem object that
<B>dpkg</B>
handles, including directories, devices, etc.). This can be used to
force programs that are normally setuid to be install without a setuid
flag, or only executable by a certain group.
<P>
<B>dpkg-statoverride</B> is a utility to manage the list of stat
overrides. It has three basic functions: adding, removing and listing
overrides.
<A NAME="lbAE">&nbsp;</A>
<H2>COMMANDS</H2>
<DL COMPACT>
<DT id="1"><B>--add</B><I> user group mode path</I>
<DD>
Add an override for <I>path</I>. <I>path</I> does not need to exist
when this command is used; the override will be stored and used later.
Users and groups can be specified by their name (for example <B>root</B>
or <B>nobody</B>), or by their number by prepending the number with a
'<B>#</B>' (for example <B>#0</B> or <B>#65534</B>).
The <I>mode</I> needs to be specified in octal.
<P>
If <B>--update</B> is specified and <I>path</I> exists, it is immediately
set to the new owner and mode.
<DT id="2"><B>--remove</B><I> path</I>
<DD>
Remove an override for <I>path</I>, the status of <I>path</I> is left
unchanged by this command.
<DT id="3"><B>--list</B> [<I>glob-pattern</I>]
<DD>
List all overrides. If a glob pattern is specified restrict the output
to overrides which match the glob.
<DT id="4"><B>--help</B>
<DD>
Show the usage message and exit.
<DT id="5"><B>--force-help</B>
<DD>
Give help about the <B>--force-</B><I>thing</I> options (since dpkg 1.19.5).
<DT id="6"><B>--version</B>
<DD>
Show the version and exit.
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>OPTIONS</H2>
<DL COMPACT>
<DT id="7"><B>--admindir</B><I> directory</I>
<DD>
Set the administrative directory to <I>directory</I>.
This is where the <I>statoverride</I> file is stored.
Defaults to &laquo;<I>/var/lib/dpkg</I>&raquo;.
<DT id="8"><B>--instdir</B><I> directory</I>
<DD>
Set the installation directory, which refers to the directory where
packages get installed (since dpkg 1.19.2).
Defaults to &laquo;<I>/</I>&raquo;.
<DT id="9"><B>--root</B><I> directory</I>
<DD>
Set the root directory to <B>directory</B>, which sets the installation
directory to &laquo;<I>directory</I>&raquo; and the administrative
directory to &laquo;<I>directory</I><B>/var/lib/dpkg</B>&raquo; (since dpkg 1.19.2).
<DT id="10"><B>--force-</B><I>things</I>
<DD>
<B>--no-force-</B><I>things</I>, <B>--refuse-</B><I>things</I>
Force or refuse (<B>no-force</B> and <B>refuse</B> mean the same thing)
to do some things (since dpkg 1.19.5).
<I>things</I> is a comma separated list of things specified below.
<B>--force-help</B> displays a message describing them.
Things marked with (*) are forced by default.
<P>
<I>Warning: These options are mostly intended to be used by experts only.
Using them without fully understanding their effects may break your whole
system.</I>
<P>
<B>all</B>:
Turns on (or off) all force options.
<P>
<B>statoverride-add</B>:
Overwrite an existing stat override when adding it (since dpkg 1.19.5).
<P>
<B>statoverride-remove</B>:
Ignore a missing stat override when removing it (since dpkg 1.19.5).
<P>
<B>security-mac</B>(*):
Use platform-specific Mandatory Access Controls (MAC) based security when
installing files into the filesystem (since dpkg 1.19.5).
On Linux systems the implementation uses SELinux.
<DT id="11"><B>--force</B>
<DD>
Force an action, even if a sanity check would otherwise prohibit it.
This is necessary to override an existing override.
This option is deprecated (since dpkg 1.19.5), it is replaced by
<B>--force-all</B>.
<DT id="12"><B>--update</B>
<DD>
Immediately try to change the <I>path</I> to the new owner and mode if it
exists.
<DT id="13"><B>--quiet</B>
<DD>
Be less verbose about what we do.
</DL>
<A NAME="lbAG">&nbsp;</A>
<H2>EXIT STATUS</H2>
<DL COMPACT>
<DT id="14"><B>0</B>
<DD>
The requested action was successfully performed.
<DT id="15"><B>1</B>
<DD>
For <B>--list</B>, if there are no overrides or none match the supplied
glob.
<DT id="16"><B>2</B>
<DD>
Fatal or unrecoverable error due to invalid command-line usage, or
interactions with the system, such as accesses to the database,
memory allocations, etc.
</DL>
<A NAME="lbAH">&nbsp;</A>
<H2>ENVIRONMENT</H2>
<DL COMPACT>
<DT id="17"><B>DPKG_ROOT</B>
<DD>
If set and the <B>--instdir</B> or <B>--root</B> options have not been
specified, it will be used as the filesystem root directory
(since dpkg 1.19.2).
<DT id="18"><B>DPKG_ADMINDIR</B>
<DD>
If set and the <B>--admindir</B> or <B>--root</B> options have not been
specified, it will be used as the <B>dpkg</B> data directory.
<DT id="19"><B>DPKG_FORCE</B>
<DD>
If set and none of the <B>--force-</B><I>...</I> options have been
specified, it will be used as the force options to use (since dpkg 1.19.5).
<DT id="20"><B>DPKG_COLORS</B>
<DD>
Sets the color mode (since dpkg 1.18.5).
The currently accepted values are: <B>auto</B> (default), <B>always</B> and
<B>never</B>.
</DL>
<A NAME="lbAI">&nbsp;</A>
<H2>FILES</H2>
<DL COMPACT>
<DT id="21"><I>/var/lib/dpkg/statoverride</I>
<DD>
File which contains the current list of stat overrides of the system. It
is located in the <B>dpkg</B> administration directory, along with other files
important to <B>dpkg</B>, such as <I>status</I> or <I>available</I>.
<BR>
Note: <B>dpkg-statoverride</B> preserves the old copy of this file, with
extension "-old", before replacing it with the new one.
</DL>
<A NAME="lbAJ">&nbsp;</A>
<H2>SEE ALSO</H2>
<B><A HREF="/cgi-bin/man/man2html?1+dpkg">dpkg</A></B>(1).
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="22"><A HREF="#lbAB">NAME</A><DD>
<DT id="23"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="24"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="25"><A HREF="#lbAE">COMMANDS</A><DD>
<DT id="26"><A HREF="#lbAF">OPTIONS</A><DD>
<DT id="27"><A HREF="#lbAG">EXIT STATUS</A><DD>
<DT id="28"><A HREF="#lbAH">ENVIRONMENT</A><DD>
<DT id="29"><A HREF="#lbAI">FILES</A><DD>
<DT id="30"><A HREF="#lbAJ">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:11 GMT, March 31, 2021
</BODY>
</HTML>