test: Refactor ar handling into m4 macros
[dpkg.git] / man / dpkg-statoverride.pod
blobd986654942b91cfce646dff427747967d23c65db
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/>.
19 =encoding utf8
21 =head1 NAME
23 dpkg-statoverride - override ownership and mode of files
25 =head1 SYNOPSIS
27 B<dpkg-statoverride>
28 [I<option>...] I<command>
30 =head1 DESCRIPTION
32 “B<stat overrides>” are a way to tell
33 L<dpkg(1)>
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
37 B<dpkg>
38 handles, including directories, devices, etc.).
39 This can be used to
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
44 overrides.
45 It has three basic functions: adding, removing and listing
46 overrides.
48 =head1 COMMANDS
50 =over
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>]
72 List all overrides.
73 If a glob pattern is specified restrict the output
74 to overrides which match the glob.
76 =item B<--help>
78 Show the usage message and exit.
80 =item B<--force-help>
82 Give help about the B<--force->I<thing> options (since dpkg 1.19.5).
84 =item B<--version>
86 Show the version and exit.
88 =back
90 =head1 OPTIONS
92 =over
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
125 system.
127 =over 4
129 =item B<all>:
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.
147 =item B<not-root>:
149 Try to (de)install things even when not root (since dpkg 1.21.8).
151 =back
153 =item B<--force>
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
158 B<--force-all>.
160 =item B<--update>
162 Immediately try to change the I<path> to the new owner and mode if it
163 exists.
165 =item B<--quiet>
167 Be less verbose about what we do.
169 =back
171 =head1 EXIT STATUS
173 =over
175 =item B<0>
177 The requested action was successfully performed.
179 =item B<1>
181 For B<--list>, if there are no overrides or none match the supplied
182 glob.
184 =item B<2>
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.
190 =back
192 =head1 ENVIRONMENT
194 =over
196 =item B<DPKG_ROOT>
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
200 (since dpkg 1.19.2).
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.
207 =item B<DPKG_DEBUG>
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.
213 =item B<DPKG_FORCE>
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).
218 =item B<DPKG_COLORS>
220 Sets the color mode (since dpkg 1.18.5).
221 The currently accepted values are: B<auto> (default), B<always> and
222 B<never>.
224 =item B<DPKG_NLS>
226 If set, it will be used to decide whether to activate Native Language Support,
227 also known as internationalization (or i18n) support (since dpkg 1.22.7).
228 The accepted values are: B<0> and B<1> (default).
230 =back
232 =head1 FILES
234 =over
236 =item I<%ADMINDIR%/statoverride>
238 File which contains the current list of stat overrides of the system.
240 is located in the B<dpkg> administration directory, along with other files
241 important to B<dpkg>, such as I<status> or I<available>.
243 B<Note>: B<dpkg-statoverride> preserves the old copy of this file, with
244 extension “-old”, before replacing it with the new one.
246 =back
248 =head1 SEE ALSO
250 L<dpkg(1)>.