dpkg-statoverride.1 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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 "2013-04-01" "Debian project" "dpkg utilities"
  20. .SH NAME
  21. dpkg\-statoverride \- override ownership and mode of files
  22. .
  23. .SH SYNOPSIS
  24. .B dpkg\-statoverride
  25. .RI [ option "...] " command
  26. .
  27. .SH DESCRIPTION
  28. \(lq\fBstat overrides\fR\(rq are a way to tell
  29. .BR dpkg (1)
  30. to use a different owner
  31. or mode for a path when a package is installed (this applies to any
  32. filesystem object that
  33. .B dpkg
  34. handles, including directories, devices, etc.). This can be used to
  35. force programs that are normally setuid to be install without a setuid
  36. flag, or only executable by a certain group.
  37. .P
  38. \fBdpkg\-statoverride\fR is a utility to manage the list of stat
  39. overrides. It has three basic functions: adding, removing and listing
  40. overrides.
  41. .
  42. .SH COMMANDS
  43. .TP
  44. .BI \-\-add " user group mode path"
  45. Add an override for \fIpath\fP. \fIpath\fP does not need to exist
  46. when this command is used; the override will be stored and used later.
  47. Users and groups can be specified by their name (for example \fBroot\fR
  48. or \fBnobody\fR), or by their number by prepending the number with a
  49. \(oq\fB#\fR\(cq (for example \fB#0\fR or \fB#65534\fR).
  50. The \fImode\fR needs to be specified in octal.
  51. If \fB\-\-update\fP is specified and \fIpath\fP exists, it is immediately
  52. set to the new owner and mode.
  53. .TP
  54. .BI \-\-remove " path"
  55. Remove an override for \fIpath\fP, the status of \fIpath\fP is left
  56. unchanged by this command.
  57. .TP
  58. .BR \-\-list " [\fIglob-pattern\fP]"
  59. List all overrides. If a glob pattern is specified restrict the output
  60. to overrides which match the glob. If there are no overrides or none
  61. match the glob \fBdpkg\-statoverride\fR will exit with an exitcode of 1.
  62. .TP
  63. .B \-\-help
  64. Show the usage message and exit.
  65. .TP
  66. .B \-\-version
  67. Show the version and exit.
  68. .
  69. .SH OPTIONS
  70. .TP
  71. .BI \-\-admindir " directory"
  72. Change the \fIdirectory\fP of the \fBdpkg\fP database where the statoverride
  73. file is also stored. Defaults to \fI/var/lib/dpkg\fP.
  74. .TP
  75. .B \-\-force
  76. Force an action, even if a sanity check would otherwise prohibit it.
  77. This is necessary to override an existing override.
  78. .TP
  79. .B \-\-update
  80. Immediately try to change the \fIpath\fP to the new owner and mode if it
  81. exists.
  82. .TP
  83. .B \-\-quiet
  84. Be less verbose about what we do.
  85. .
  86. .SH ENVIRONMENT
  87. .TP
  88. .B DPKG_ADMINDIR
  89. If set and the \fB\-\-admindir\fP option has not been specified, it will
  90. be used as the \fBdpkg\fP data directory.
  91. .
  92. .SH FILES
  93. .TP
  94. .I /var/lib/dpkg/statoverride
  95. File which contains the current list of stat overrides of the system. It
  96. is located in the \fBdpkg\fP administration directory, along with other files
  97. important to \fBdpkg\fP, such as \fIstatus\fP or \fIavailable\fP.
  98. .br
  99. Note: \fBdpkg\-statoverride\fP preserves the old copy of this file, with
  100. extension \(lq\-old\(rq, before replacing it with the new one.
  101. .
  102. .SH SEE ALSO
  103. .BR dpkg (1).