From b6be6a6721e3d7ba0f01cfba135d2d6cf526087b Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 8 Nov 2023 15:36:43 +0100 Subject: [PATCH] man: document explicitly tha ReadWritePaths= cannot undo superblock read-only settings Fixes: #29266 --- man/systemd.exec.xml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/man/systemd.exec.xml b/man/systemd.exec.xml index d81154a339f..525303c6ebf 100644 --- a/man/systemd.exec.xml +++ b/man/systemd.exec.xml @@ -1631,7 +1631,12 @@ StateDirectory=aaa/bbb ccc permit this. Nest ReadWritePaths= inside of ReadOnlyPaths= in order to provide writable subdirectories within read-only directories. Use ReadWritePaths= in order to allow-list specific paths for write access if - ProtectSystem=strict is used. + ProtectSystem=strict is used. Note that ReadWritePaths= cannot + be used to gain write access to a file system whose superblock is mounted read-only. On Linux, for + each mount point write access is granted only if the mount point itself and the + file system superblock backing it are not marked read-only. ReadWritePaths= only + controls the former, not the latter, hence a read-only file system superblock remains + protected. Paths listed in InaccessiblePaths= will be made inaccessible for processes inside the namespace along with everything below them in the file system hierarchy. This may be more restrictive than -- 2.47.3