dpkg-statoverride.1 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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.
  61. .TP
  62. .B \-\-help
  63. Show the usage message and exit.
  64. .TP
  65. .B \-\-version
  66. Show the version and exit.
  67. .
  68. .SH OPTIONS
  69. .TP
  70. .BI \-\-admindir " directory"
  71. Change the \fIdirectory\fP of the \fBdpkg\fP database where the statoverride
  72. file is also stored. Defaults to \fI/var/lib/dpkg\fP.
  73. .TP
  74. .B \-\-force
  75. Force an action, even if a sanity check would otherwise prohibit it.
  76. This is necessary to override an existing override.
  77. .TP
  78. .B \-\-update
  79. Immediately try to change the \fIpath\fP to the new owner and mode if it
  80. exists.
  81. .TP
  82. .B \-\-quiet
  83. Be less verbose about what we do.
  84. .
  85. .SH EXIT STATUS
  86. .TP
  87. .B 0
  88. The requested action was successfully performed.
  89. .TP
  90. .B 1
  91. For \fB\-\-list\fP, if there are no overrides or none match the supplied
  92. glob.
  93. .TP
  94. .B 2
  95. Fatal or unrecoverable error due to invalid command-line usage, or
  96. interactions with the system, such as accesses to the database,
  97. memory allocations, etc.
  98. .
  99. .SH ENVIRONMENT
  100. .TP
  101. .B DPKG_ADMINDIR
  102. If set and the \fB\-\-admindir\fP option has not been specified, it will
  103. be used as the \fBdpkg\fP data directory.
  104. .
  105. .SH FILES
  106. .TP
  107. .I /var/lib/dpkg/statoverride
  108. File which contains the current list of stat overrides of the system. It
  109. is located in the \fBdpkg\fP administration directory, along with other files
  110. important to \fBdpkg\fP, such as \fIstatus\fP or \fIavailable\fP.
  111. .br
  112. Note: \fBdpkg\-statoverride\fP preserves the old copy of this file, with
  113. extension \(lq\-old\(rq, before replacing it with the new one.
  114. .
  115. .SH SEE ALSO
  116. .BR dpkg (1).