1 # dpkg manual page - dpkg-statoverride(1)
3 # Copyright © 2000-2001 Wichert Akkerman <wakkerma@debian.org>
4 # Copyright © 2009-2011, 2013, 2015 Guillem Jover <guillem@debian.org>
6 # This is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
11 # This is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <https://www.gnu.org/licenses/>.
23 dpkg-statoverride - override ownership and mode of files
28 [I<option>...] I<command>
32 “B<stat overrides>” are a way to tell
34 to use a different owner
35 or mode for a path when a package is installed (this applies to any
36 filesystem object that
38 handles, including directories, devices, etc.). This can be used to
39 force programs that are normally setuid to be install without a setuid
40 flag, or only executable by a certain group.
42 B<dpkg-statoverride> is a utility to manage the list of stat
43 overrides. It has three basic functions: adding, removing and listing
50 =item B<--add> I<user group mode path>
52 Add an override for I<path>. I<path> does not need to exist nor be known to
53 B<dpkg> when this command is used; the override will be stored and used later.
54 Users and groups can be specified by their name (for example B<root>
55 or B<nobody>), or by their number by prepending the number with a
56 ‘B<#>’ (for example B<#0> or B<#65534>).
57 The I<mode> needs to be specified in octal.
59 If B<--update> is specified and I<path> exists, it is immediately
60 set to the new owner and mode.
62 =item B<--remove> I<path>
64 Remove an override for I<path>, the status of I<path> is left
65 unchanged by this command.
67 =item B<--list> [I<glob-pattern>]
69 List all overrides. If a glob pattern is specified restrict the output
70 to overrides which match the glob.
74 Show the usage message and exit.
78 Give help about the B<--force->I<thing> options (since dpkg 1.19.5).
82 Show the version and exit.
90 =item B<--admindir> I<directory>
92 Set the administrative directory to I<directory>.
93 This is where the I<statoverride> file is stored.
94 Defaults to «I<%ADMINDIR%>» if B<DPKG_ADMINDIR> has not been set.
96 =item B<--instdir> I<directory>
98 Set the installation directory, which refers to the directory where
99 packages get installed (since dpkg 1.19.2).
100 Defaults to «I</>» if B<DPKG_ROOT> has not been set.
102 =item B<--root> I<directory>
104 Set the root directory to B<directory>, which sets the installation
105 directory to «I<directory>» and the administrative
106 directory to «I<directory>B<%ADMINDIR%>» (since dpkg 1.19.2)
107 if B<DPKG_ROOT> has not been set.
109 =item B<--force->I<things>
111 =item B<--no-force->I<things>, B<--refuse->I<things>
113 Force or refuse (B<no-force> and B<refuse> mean the same thing)
114 to do some things (since dpkg 1.19.5).
115 I<things> is a comma separated list of things specified below.
116 B<--force-help> displays a message describing them.
117 Things marked with (*) are forced by default.
119 B<Warning>: These options are mostly intended to be used by experts only.
120 Using them without fully understanding their effects may break your whole
127 Turns on (or off) all force options.
129 =item B<statoverride-add>:
131 Overwrite an existing stat override when adding it (since dpkg 1.19.5).
133 =item B<statoverride-remove>:
135 Ignore a missing stat override when removing it (since dpkg 1.19.5).
137 =item B<security-mac>(*):
139 Use platform-specific Mandatory Access Controls (MAC) based security when
140 installing files into the filesystem (since dpkg 1.19.5).
141 On Linux systems the implementation uses SELinux.
145 Try to (de)install things even when not root (since dpkg 1.21.8).
151 Force an action, even if a sanity check would otherwise prohibit it.
152 This is necessary to override an existing override.
153 This option is deprecated (since dpkg 1.19.5), it is replaced by
158 Immediately try to change the I<path> to the new owner and mode if it
163 Be less verbose about what we do.
173 The requested action was successfully performed.
177 For B<--list>, if there are no overrides or none match the supplied
182 Fatal or unrecoverable error due to invalid command-line usage, or
183 interactions with the system, such as accesses to the database,
184 memory allocations, etc.
194 If set and the B<--instdir> or B<--root> options have not been
195 specified, it will be used as the filesystem root directory
198 =item B<DPKG_ADMINDIR>
200 If set and the B<--admindir> or B<--root> options have not been
201 specified, it will be used as the B<dpkg> data directory.
205 Sets the debug mask (since dpkg 1.21.10) from an octal value.
206 The currently accepted flags are described in the B<dpkg --debug> option,
207 but not all these flags might have an effect on this program.
211 If set and none of the B<--force->I<...> options have been
212 specified, it will be used as the force options to use (since dpkg 1.19.5).
216 Sets the color mode (since dpkg 1.18.5).
217 The currently accepted values are: B<auto> (default), B<always> and
226 =item I<%ADMINDIR%/statoverride>
228 File which contains the current list of stat overrides of the system. It
229 is located in the B<dpkg> administration directory, along with other files
230 important to B<dpkg>, such as I<status> or I<available>.
232 B<Note>: B<dpkg-statoverride> preserves the old copy of this file, with
233 extension “-old”, before replacing it with the new one.