Skip to content

Commit

Permalink
man: document that StateDirectory= trumps ProtectSystem=strict explic…
Browse files Browse the repository at this point in the history
…itly

Fixes: #29798
(cherry picked from commit 04366e0)
  • Loading branch information
poettering authored and bluca committed Apr 23, 2024
1 parent fd0d7c9 commit 1db2477
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions man/systemd.exec.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1382,14 +1382,16 @@ CapabilityBoundingSet=~CAP_B CAP_C</programlisting>
mounted read-only, except for the API file system subtrees <filename>/dev/</filename>,
<filename>/proc/</filename> and <filename>/sys/</filename> (protect these directories using
<varname>PrivateDevices=</varname>, <varname>ProtectKernelTunables=</varname>,
<varname>ProtectControlGroups=</varname>). This setting ensures that any modification of the vendor-supplied
operating system (and optionally its configuration, and local mounts) is prohibited for the service. It is
recommended to enable this setting for all long-running services, unless they are involved with system updates
or need to modify the operating system in other ways. If this option is used,
<varname>ReadWritePaths=</varname> may be used to exclude specific directories from being made read-only. This
setting is implied if <varname>DynamicUser=</varname> is set. This setting cannot ensure protection in all
cases. In general it has the same limitations as <varname>ReadOnlyPaths=</varname>, see below. Defaults to
off.</para>
<varname>ProtectControlGroups=</varname>). This setting ensures that any modification of the
vendor-supplied operating system (and optionally its configuration, and local mounts) is prohibited
for the service. It is recommended to enable this setting for all long-running services, unless they
are involved with system updates or need to modify the operating system in other ways. If this option
is used, <varname>ReadWritePaths=</varname> may be used to exclude specific directories from being
made read-only. Similar, <varname>StateDirectory=</varname>, <varname>LogsDirectory=</varname>, … and
related directory settings (see below) also exclude the specific directories from the effect of
<varname>ProtectSystem=</varname>. This setting is implied if <varname>DynamicUser=</varname> is
set. This setting cannot ensure protection in all cases. In general it has the same limitations as
<varname>ReadOnlyPaths=</varname>, see below. Defaults to off.</para>

<xi:include href="version-info.xml" xpointer="v214"/></listitem>
</varlistentry>
Expand Down

0 comments on commit 1db2477

Please sign in to comment.