dpkg (1.18.25) stretch; urgency=medium
[dpkg] / man / dpkg-statoverride.man
1 .\" dpkg manual page - dpkg-statoverride(1)
2 .\"
3 .\" Copyright © 2000-2001 Wichert Akkerman <wakkerma@debian.org>
4 .\" Copyright © 2009-2011, 2013, 2015 Guillem Jover <guillem@debian.org>
5 .\"
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.
10 .\"
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.
15 .\"
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/>.
18 .
19 .TH dpkg\-statoverride 1 "%RELEASE_DATE%" "%VERSION%" "dpkg suite"
20 .nh
21 .SH NAME
22 dpkg\-statoverride \- override ownership and mode of files
23 .
24 .SH SYNOPSIS
25 .B dpkg\-statoverride
26 .RI [ option "...] " command
27 .
28 .SH DESCRIPTION
29 “\fBstat overrides\fR” are a way to tell
30 .BR dpkg (1)
31 to use a different owner
32 or mode for a path when a package is installed (this applies to any
33 filesystem object that
34 .B dpkg
35 handles, including directories, devices, etc.). This can be used to
36 force programs that are normally setuid to be install without a setuid
37 flag, or only executable by a certain group.
38 .P
39 \fBdpkg\-statoverride\fR is a utility to manage the list of stat
40 overrides. It has three basic functions: adding, removing and listing
41 overrides.
42 .
43 .SH COMMANDS
44 .TP
45 .BI \-\-add " user group mode path"
46 Add an override for \fIpath\fP. \fIpath\fP does not need to exist
47 when this command is used; the override will be stored and used later.
48 Users and groups can be specified by their name (for example \fBroot\fR
49 or \fBnobody\fR), or by their number by prepending the number with a
50 ‘\fB#\fR’ (for example \fB#0\fR or \fB#65534\fR).
51 The \fImode\fR needs to be specified in octal.
52
53 If \fB\-\-update\fP is specified and \fIpath\fP exists, it is immediately
54 set to the new owner and mode.
55 .TP
56 .BI \-\-remove " path"
57 Remove an override for \fIpath\fP, the status of \fIpath\fP is left
58 unchanged by this command.
59 .TP
60 .BR \-\-list " [\fIglob-pattern\fP]"
61 List all overrides. If a glob pattern is specified restrict the output
62 to overrides which match the glob.
63 .TP
64 .B \-\-help
65 Show the usage message and exit.
66 .TP
67 .B \-\-version
68 Show the version and exit.
69 .
70 .SH OPTIONS
71 .TP
72 .BI \-\-admindir " directory"
73 Change the \fIdirectory\fP of the \fBdpkg\fP database where the statoverride
74 file is also stored. Defaults to \fI%ADMINDIR%\fP.
75 .TP
76 .B \-\-force
77 Force an action, even if a sanity check would otherwise prohibit it.
78 This is necessary to override an existing override.
79 .TP
80 .B \-\-update
81 Immediately try to change the \fIpath\fP to the new owner and mode if it
82 exists.
83 .TP
84 .B \-\-quiet
85 Be less verbose about what we do.
86 .
87 .SH EXIT STATUS
88 .TP
89 .B 0
90 The requested action was successfully performed.
91 .TP
92 .B 1
93 For \fB\-\-list\fP, if there are no overrides or none match the supplied
94 glob.
95 .TP
96 .B 2
97 Fatal or unrecoverable error due to invalid command-line usage, or
98 interactions with the system, such as accesses to the database,
99 memory allocations, etc.
100 .
101 .SH ENVIRONMENT
102 .TP
103 .B DPKG_ADMINDIR
104 If set and the \fB\-\-admindir\fP option has not been specified, it will
105 be used as the \fBdpkg\fP data directory.
106 .
107 .SH FILES
108 .TP
109 .I %ADMINDIR%/statoverride
110 File which contains the current list of stat overrides of the system. It
111 is located in the \fBdpkg\fP administration directory, along with other files
112 important to \fBdpkg\fP, such as \fIstatus\fP or \fIavailable\fP.
113 .br
114 Note: \fBdpkg\-statoverride\fP preserves the old copy of this file, with
115 extension “\-old”, before replacing it with the new one.
116 .
117 .SH SEE ALSO
118 .BR dpkg (1).