table of contents
| apk-protected_paths(5) | File Formats Manual | apk-protected_paths(5) |
NAME¶
/etc/apk/protected_paths.d/*.list - paths with special treatement by apk
DESCRIPTION¶
Files in /etc/apk/protected_paths.d/*.list enumerate files are protected and are not overwritten by apk(8). Generally, these are configuration files that are expected to be modified by the system administrator. These files also receive special treatment by apk-audit(8).
If apk(8) would install a file into a protected path which has been modified, it shall intend write the file into a file with the .apk-new suffix.
For example, once the file /etc/passwd is modified by the local administrator, apk(8) should not overwrite it when upgrading or fixing packages. Likewise, protected files modified by any automation (including post-install scripts) are not overwritten.
apk-audit(8) shall report protected paths by default. When using apk audit --system or apk audit --full, protected files shall be omitted from the output. When using apk audit --backup, matching files are always reported. This is in turn used by lbu commit.
FILE FORMAT¶
Each line is a single rule composed of one symbol followed with a glob expression, which shall be evaluated relative to the root directory.
The initial symbol must be one of:
+
-
@
!
Lines starting with # and empty lines are ignored.
EXAMPLES¶
# This line is ignored; it is a comment. +etc/ @etc/init.d !etc/apk -etc/ssl/certs/ca-cert-*.pem
CAVEATS¶
If a file is modified, and its contents eventually become the same as what was originally installed by apk, the file is considered to have been unmodified.
Wildcard patterns are not taken into account by apk(8) when creating .apk-new files instead of overwriting files.
SEE ALSO¶
| 2025-12-03 |