.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "dpkg-statoverride 1" .TH dpkg-statoverride 1 2024-03-10 1.22.6 "dpkg suite" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME dpkg\-statoverride \- override ownership and mode of files .SH SYNOPSIS .IX Header "SYNOPSIS" \&\fBdpkg-statoverride\fR [\fIoption\fR...] \fIcommand\fR .SH DESCRIPTION .IX Header "DESCRIPTION" \(lq\fBstat overrides\fR\(rq are a way to tell \&\fBdpkg\fR\|(1) to use a different owner or mode for a path when a package is installed (this applies to any filesystem object that \&\fBdpkg\fR 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. .PP \&\fBdpkg-statoverride\fR is a utility to manage the list of stat overrides. It has three basic functions: adding, removing and listing overrides. .SH COMMANDS .IX Header "COMMANDS" .IP "\fB\-\-add\fR \fIuser group mode path\fR" 4 .IX Item "--add user group mode path" Add an override for \fIpath\fR. \&\fIpath\fR does not need to exist nor be known to \&\fBdpkg\fR when this command is used; the override will be stored and used later. Users and groups can be specified by their name (for example \fBroot\fR or \fBnobody\fR), or by their number by prepending the number with a \(oq\fB#\fR\(cq (for example \fB#0\fR or \fB#65534\fR). The \fImode\fR needs to be specified in octal. .Sp If \fB\-\-update\fR is specified and \fIpath\fR exists, it is immediately set to the new owner and mode. .IP "\fB\-\-remove\fR \fIpath\fR" 4 .IX Item "--remove path" Remove an override for \fIpath\fR, the status of \fIpath\fR is left unchanged by this command. .IP "\fB\-\-list\fR [\fIglob-pattern\fR]" 4 .IX Item "--list [glob-pattern]" List all overrides. If a glob pattern is specified restrict the output to overrides which match the glob. .IP \fB\-\-help\fR 4 .IX Item "--help" Show the usage message and exit. .IP \fB\-\-force\-help\fR 4 .IX Item "--force-help" Give help about the \fB\-\-force\-\fR\fIthing\fR options (since dpkg 1.19.5). .IP \fB\-\-version\fR 4 .IX Item "--version" Show the version and exit. .SH OPTIONS .IX Header "OPTIONS" .IP "\fB\-\-admindir\fR \fIdirectory\fR" 4 .IX Item "--admindir directory" Set the administrative directory to \fIdirectory\fR. This is where the \fIstatoverride\fR file is stored. Defaults to \(Fo\fI/var/lib/dpkg\fR\(Fc if \fBDPKG_ADMINDIR\fR has not been set. .IP "\fB\-\-instdir\fR \fIdirectory\fR" 4 .IX Item "--instdir directory" Set the installation directory, which refers to the directory where packages get installed (since dpkg 1.19.2). Defaults to \(Fo\fI/\fR\(Fc if \fBDPKG_ROOT\fR has not been set. .IP "\fB\-\-root\fR \fIdirectory\fR" 4 .IX Item "--root directory" Set the root directory to \fBdirectory\fR, which sets the installation directory to \(Fo\fIdirectory\fR\(Fc and the administrative directory to \(Fo\fIdirectory\fR\fB/var/lib/dpkg\fR\(Fc (since dpkg 1.19.2) if \fBDPKG_ROOT\fR has not been set. .IP \fB\-\-force\-\fR\fIthings\fR 4 .IX Item "--force-things" .PD 0 .IP "\fB\-\-no\-force\-\fR\fIthings\fR, \fB\-\-refuse\-\fR\fIthings\fR" 4 .IX Item "--no-force-things, --refuse-things" .PD Force or refuse (\fBno-force\fR and \fBrefuse\fR mean the same thing) to do some things (since dpkg 1.19.5). \&\fIthings\fR is a comma separated list of things specified below. \&\fB\-\-force\-help\fR displays a message describing them. Things marked with (*) are forced by default. .Sp \&\fBWarning\fR: These options are mostly intended to be used by experts only. Using them without fully understanding their effects may break your whole system. .RS 4 .IP \fBall\fR: 4 .IX Item "all:" Turns on (or off) all force options. .IP \fBstatoverride-add\fR: 4 .IX Item "statoverride-add:" Overwrite an existing stat override when adding it (since dpkg 1.19.5). .IP \fBstatoverride-remove\fR: 4 .IX Item "statoverride-remove:" Ignore a missing stat override when removing it (since dpkg 1.19.5). .IP \fBsecurity-mac\fR(*): 4 .IX Item "security-mac(*):" 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. .IP \fBnot-root\fR: 4 .IX Item "not-root:" Try to (de)install things even when not root (since dpkg 1.21.8). .RE .RS 4 .RE .IP \fB\-\-force\fR 4 .IX Item "--force" 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 \&\fB\-\-force\-all\fR. .IP \fB\-\-update\fR 4 .IX Item "--update" Immediately try to change the \fIpath\fR to the new owner and mode if it exists. .IP \fB\-\-quiet\fR 4 .IX Item "--quiet" Be less verbose about what we do. .SH "EXIT STATUS" .IX Header "EXIT STATUS" .IP \fB0\fR 4 .IX Item "0" The requested action was successfully performed. .IP \fB1\fR 4 .IX Item "1" For \fB\-\-list\fR, if there are no overrides or none match the supplied glob. .IP \fB2\fR 4 .IX Item "2" Fatal or unrecoverable error due to invalid command-line usage, or interactions with the system, such as accesses to the database, memory allocations, etc. .SH ENVIRONMENT .IX Header "ENVIRONMENT" .IP \fBDPKG_ROOT\fR 4 .IX Item "DPKG_ROOT" If set and the \fB\-\-instdir\fR or \fB\-\-root\fR options have not been specified, it will be used as the filesystem root directory (since dpkg 1.19.2). .IP \fBDPKG_ADMINDIR\fR 4 .IX Item "DPKG_ADMINDIR" If set and the \fB\-\-admindir\fR or \fB\-\-root\fR options have not been specified, it will be used as the \fBdpkg\fR data directory. .IP \fBDPKG_DEBUG\fR 4 .IX Item "DPKG_DEBUG" Sets the debug mask (since dpkg 1.21.10) from an octal value. The currently accepted flags are described in the \fBdpkg \-\-debug\fR option, but not all these flags might have an effect on this program. .IP \fBDPKG_FORCE\fR 4 .IX Item "DPKG_FORCE" If set and none of the \fB\-\-force\-\fR\fI...\fR options have been specified, it will be used as the force options to use (since dpkg 1.19.5). .IP \fBDPKG_COLORS\fR 4 .IX Item "DPKG_COLORS" Sets the color mode (since dpkg 1.18.5). The currently accepted values are: \fBauto\fR (default), \fBalways\fR and \&\fBnever\fR. .SH FILES .IX Header "FILES" .IP \fI/var/lib/dpkg/statoverride\fR 4 .IX Item "/var/lib/dpkg/statoverride" File which contains the current list of stat overrides of the system. It is located in the \fBdpkg\fR administration directory, along with other files important to \fBdpkg\fR, such as \fIstatus\fR or \fIavailable\fR. .Sp \&\fBNote\fR: \fBdpkg-statoverride\fR preserves the old copy of this file, with extension \(lq\-old\(rq, before replacing it with the new one. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBdpkg\fR\|(1).