From c751714d8ce357b593e2be15fa3d0bd4e83df961 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Mon, 16 Mar 2026 18:45:58 +0000 Subject: [PATCH] man: document that with RuntimeDirecoryPreserve= dirs are under /run/private/ This is not immediately obvious so document it explicitly. Follow-up for 40cd2ecc26b776ef085fd0fd29e8e96f6422a0d3 --- man/systemd.exec.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/man/systemd.exec.xml b/man/systemd.exec.xml index 093cd2780b6..48bec7361bd 100644 --- a/man/systemd.exec.xml +++ b/man/systemd.exec.xml @@ -1773,6 +1773,15 @@ StateDirectory=aaa/bbb ccc tmpfs, then for system services the directories specified in RuntimeDirectory= are removed when the system is rebooted. + If DynamicUser= is used together with + RuntimeDirectoryPreserve= set to values other than , the logic + is slightly altered: the RuntimeDirectory= directories are created below + /run/private/, which is a host directory made inaccessible to unprivileged + users, which ensures that access to these directories cannot be gained through dynamic user ID + recycling. Symbolic links are created to hide this difference in behaviour. Both from the + perspective of the host and from inside the unit, the relevant directories hence always appear + directly below /run/. +