dpkg-statoverride.man 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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%" "Debian project" "dpkg utilities"
  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. If \fB\-\-update\fP is specified and \fIpath\fP exists, it is immediately
  53. set to the new owner and mode.
  54. .TP
  55. .BI \-\-remove " path"
  56. Remove an override for \fIpath\fP, the status of \fIpath\fP is left
  57. unchanged by this command.
  58. .TP
  59. .BR \-\-list " [\fIglob-pattern\fP]"
  60. List all overrides. If a glob pattern is specified restrict the output
  61. to overrides which match the glob.
  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%ADMINDIR%\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 EXIT STATUS
  87. .TP
  88. .B 0
  89. The requested action was successfully performed.
  90. .TP
  91. .B 1
  92. For \fB\-\-list\fP, if there are no overrides or none match the supplied
  93. glob.
  94. .TP
  95. .B 2
  96. Fatal or unrecoverable error due to invalid command-line usage, or
  97. interactions with the system, such as accesses to the database,
  98. memory allocations, etc.
  99. .
  100. .SH ENVIRONMENT
  101. .TP
  102. .B DPKG_ADMINDIR
  103. If set and the \fB\-\-admindir\fP option has not been specified, it will
  104. be used as the \fBdpkg\fP data directory.
  105. .
  106. .SH FILES
  107. .TP
  108. .I %ADMINDIR%/statoverride
  109. File which contains the current list of stat overrides of the system. It
  110. is located in the \fBdpkg\fP administration directory, along with other files
  111. important to \fBdpkg\fP, such as \fIstatus\fP or \fIavailable\fP.
  112. .br
  113. Note: \fBdpkg\-statoverride\fP preserves the old copy of this file, with
  114. extension “\-old”, before replacing it with the new one.
  115. .
  116. .SH SEE ALSO
  117. .BR dpkg (1).