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.
26 Users and groups can be specified by their name (for example
27 root or nobody), or by their number by prepending the number
28 with a ‘#’ (for example #0 or #65534). The mode needs to be
29 specified in octal.
30
31 If --update is specified and path exists, it is immediately set
32 to the new owner and mode.
33
34 --remove path
35 Remove an override for path, the status of path is left
36 unchanged 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 Show the usage message and exit.
43
44 --version
45 Show the version and exit.
46
48 --admindir directory
49 Change the directory of the dpkg database where the statoverride
50 file is also stored. Defaults to /var/lib/dpkg.
51
52 --force
53 Force an action, even if a sanity check would otherwise prohibit
54 it. This is necessary to override an existing override.
55
56 --update
57 Immediately try to change the path to the new owner and mode if
58 it exists.
59
60 --quiet
61 Be less verbose about what we do.
62
64 0 The requested action was successfully performed.
65
66 1 For --list, if there are no overrides or none match the supplied
67 glob.
68
69 2 Fatal or unrecoverable error due to invalid command-line usage,
70 or interactions with the system, such as accesses to the
71 database, memory allocations, etc.
72
74 DPKG_ADMINDIR
75 If set and the --admindir option has not been specified, it will
76 be used as the dpkg data directory.
77
79 /var/lib/dpkg/statoverride
80 File which contains the current list of stat overrides of the
81 system. It is located in the dpkg administration directory,
82 along with other files important to dpkg, such as status or
83 available.
84 Note: dpkg-statoverride preserves the old copy of this file,
85 with extension “-old”, before replacing it with the new one.
86
88 dpkg(1).
89
90
91
921.18.25 2018-06-26 dpkg-statoverride(1)