1dpkg-statoverride(1) dpkg suite dpkg-statoverride(1)
2
3
4
6 dpkg-statoverride - override ownership and mode of files
7
9 dpkg-statoverride [option...] command
10
12 “stat overrides” are a way to tell dpkg(1) to use a different owner or
13 mode for a path when a package is installed (this applies to any
14 filesystem object that dpkg handles, including directories, devices,
15 etc.). This can be used to force programs that are normally setuid to
16 be install without a setuid flag, or only executable by a certain
17 group.
18
19 dpkg-statoverride is a utility to manage the list of stat overrides. It
20 has three basic functions: adding, removing and listing overrides.
21
23 --add user group mode path
24 Add an override for path. path does not need to exist when this
25 command is used; the override will be stored and used later. Users
26 and groups can be specified by their name (for example root or
27 nobody), or by their number by prepending the number with a ‘#’
28 (for example #0 or #65534). The mode needs to be specified in
29 octal.
30
31 If --update is specified and path exists, it is immediately set to
32 the new owner and mode.
33
34 --remove path
35 Remove an override for path, the status of path is left unchanged
36 by this command.
37
38 --list [glob-pattern]
39 List all overrides. If a glob pattern is specified restrict the
40 output to overrides which match the glob.
41
42 --help
43 Show the usage message and exit.
44
45 --force-help
46 Give help about the --force-thing options (since dpkg 1.19.5).
47
48 --version
49 Show the version and exit.
50
52 --admindir directory
53 Set the administrative directory to directory. This is where the
54 statoverride file is stored. Defaults to «/var/lib/dpkg».
55
56 --instdir directory
57 Set the installation directory, which refers to the directory where
58 packages get installed (since dpkg 1.19.2). Defaults to «/».
59
60 --root directory
61 Set the root directory to directory, which sets the installation
62 directory to «directory» and the administrative directory to
63 «directory/var/lib/dpkg» (since dpkg 1.19.2).
64
65 --force-things
66 --no-force-things, --refuse-things
67 Force or refuse (no-force and refuse mean the same thing) to do
68 some things (since dpkg 1.19.5). things is a comma separated list
69 of things specified below. --force-help displays a message
70 describing them. Things marked with (*) are forced by default.
71
72 Warning: These options are mostly intended to be used by experts
73 only. Using them without fully understanding their effects may
74 break your whole system.
75
76 all: Turns on (or off) all force options.
77
78 statoverride-add: Overwrite an existing stat override when adding
79 it (since dpkg 1.19.5).
80
81 statoverride-remove: Ignore a missing stat override when removing
82 it (since dpkg 1.19.5).
83
84 security-mac(*): Use platform-specific Mandatory Access Controls
85 (MAC) based security when installing files into the filesystem
86 (since dpkg 1.19.5). On Linux systems the implementation uses
87 SELinux.
88
89 --force
90 Force an action, even if a sanity check would otherwise prohibit
91 it. This is necessary to override an existing override. This
92 option is deprecated (since dpkg 1.19.5), it is replaced by
93 --force-all.
94
95 --update
96 Immediately try to change the path to the new owner and mode if it
97 exists.
98
99 --quiet
100 Be less verbose about what we do.
101
103 0 The requested action was successfully performed.
104
105 1 For --list, if there are no overrides or none match the supplied
106 glob.
107
108 2 Fatal or unrecoverable error due to invalid command-line usage, or
109 interactions with the system, such as accesses to the database,
110 memory allocations, etc.
111
113 DPKG_ROOT
114 If set and the --instdir or --root options have not been specified,
115 it will be used as the filesystem root directory (since dpkg
116 1.19.2).
117
118 DPKG_ADMINDIR
119 If set and the --admindir or --root options have not been
120 specified, it will be used as the dpkg data directory.
121
122 DPKG_FORCE
123 If set and none of the --force-... options have been specified, it
124 will be used as the force options to use (since dpkg 1.19.5).
125
126 DPKG_COLORS
127 Sets the color mode (since dpkg 1.18.5). The currently accepted
128 values are: auto (default), always and never.
129
131 /var/lib/dpkg/statoverride
132 File which contains the current list of stat overrides of the
133 system. It is located in the dpkg administration directory, along
134 with other files important to dpkg, such as status or available.
135
136 Note: dpkg-statoverride preserves the old copy of this file, with
137 extension “-old”, before replacing it with the new one.
138
140 dpkg(1).
141
142
143
1441.20.9 2021-04-13 dpkg-statoverride(1)