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.).
40 force programs that are normally setuid to be install without a setuid
41 flag, or only executable by a certain group.
43 B<dpkg-statoverride> is a utility to manage the list of stat
45 It has three basic functions: adding, removing and listing
52 =item B<--add> I<user group mode path>
54 Add an override for I<path>.
55 I<path> does not need to exist nor be known to
56 B<dpkg> when this command is used; the override will be stored and used later.
57 Users and groups can be specified by their name (for example B<root>
58 or B<nobody>), or by their number by prepending the number with a
59 ‘B<#>’ (for example B<#0> or B<#65534>).
60 The I<mode> needs to be specified in octal.
62 If B<--update> is specified and I<path> exists, it is immediately
63 set to the new owner and mode.
65 =item B<--remove> I<path>
67 Remove an override for I<path>, the status of I<path> is left
68 unchanged by this command.
70 =item B<--list> [I<glob-pattern>]
73 If a glob pattern is specified restrict the output
74 to overrides which match the glob.
78 Show the usage message and exit.
82 Give help about the B<--force->I<thing> options (since dpkg 1.19.5).
86 Show the version and exit.
94 =item B<--admindir> I<directory>
96 Set the administrative directory to I<directory>.
97 This is where the I<statoverride> file is stored.
98 Defaults to «I<%ADMINDIR%>» if B<DPKG_ADMINDIR> has not been set.
100 =item B<--instdir> I<directory>
102 Set the installation directory, which refers to the directory where
103 packages get installed (since dpkg 1.19.2).
104 Defaults to «I</>» if B<DPKG_ROOT> has not been set.
106 =item B<--root> I<directory>
108 Set the root directory to B<directory>, which sets the installation
109 directory to «I<directory>» and the administrative
110 directory to «I<directory>B<%ADMINDIR%>» (since dpkg 1.19.2)
111 if B<DPKG_ROOT> has not been set.
113 =item B<--force->I<things>
115 =item B<--no-force->I<things>, B<--refuse->I<things>
117 Force or refuse (B<no-force> and B<refuse> mean the same thing)
118 to do some things (since dpkg 1.19.5).
119 I<things> is a comma separated list of things specified below.
120 B<--force-help> displays a message describing them.
121 Things marked with (*) are forced by default.
123 B<Warning>: These options are mostly intended to be used by experts only.
124 Using them without fully understanding their effects may break your whole
131 Turns on (or off) all force options.
133 =item B<statoverride-add>:
135 Overwrite an existing stat override when adding it (since dpkg 1.19.5).
137 =item B<statoverride-remove>:
139 Ignore a missing stat override when removing it (since dpkg 1.19.5).
141 =item B<security-mac>(*):
143 Use platform-specific Mandatory Access Controls (MAC) based security when
144 installing files into the filesystem (since dpkg 1.19.5).
145 On Linux systems the implementation uses SELinux.
149 Try to (de)install things even when not root (since dpkg 1.21.8).
155 Force an action, even if a sanity check would otherwise prohibit it.
156 This is necessary to override an existing override.
157 This option is deprecated (since dpkg 1.19.5), it is replaced by
162 Immediately try to change the I<path> to the new owner and mode if it
167 Be less verbose about what we do.
177 The requested action was successfully performed.
181 For B<--list>, if there are no overrides or none match the supplied
186 Fatal or unrecoverable error due to invalid command-line usage, or
187 interactions with the system, such as accesses to the database,
188 memory allocations, etc.
198 If set and the B<--instdir> or B<--root> options have not been
199 specified, it will be used as the filesystem root directory
202 =item B<DPKG_ADMINDIR>
204 If set and the B<--admindir> or B<--root> options have not been
205 specified, it will be used as the B<dpkg> data directory.
209 Sets the debug mask (since dpkg 1.21.10) from an octal value.
210 The currently accepted flags are described in the B<dpkg --debug> option,
211 but not all these flags might have an effect on this program.
215 If set and none of the B<--force->I<...> options have been
216 specified, it will be used as the force options to use (since dpkg 1.19.5).
220 Sets the color mode (since dpkg 1.18.5).
221 The currently accepted values are: B<auto> (default), B<always> and
230 =item I<%ADMINDIR%/statoverride>
232 File which contains the current list of stat overrides of the system.
234 is located in the B<dpkg> administration directory, along with other files
235 important to B<dpkg>, such as I<status> or I<available>.
237 B<Note>: B<dpkg-statoverride> preserves the old copy of this file, with
238 extension “-old”, before replacing it with the new one.