[systemd-devel] ReadWriteDirectories directive in service file?

Uoti Urpala uoti.urpala at pp1.inet.fi
Thu Jun 11 19:39:10 UTC 2020


On Thu, 2020-06-11 at 11:39 -0400, Bruce A. Johnson wrote:
> I'm trying to figure out how to resolve these errors that are preventing
> one of my services from running, and I'm kind of at a loss. Systemd is
> stumbling over a read-write directory that needs to be created for the
> service.
> 
> > Jun 04 09:44:03 url-000db95361f2 systemd[3819]: rl-web.service: Failed
> > to set up mount namespacing: /run/systemd/unit-root/run/rl-web/tmp: No
> > such file or directory

> I cannot find the /ReadWriteDirectory/ directive I used in my original
> service file in the current systemd documentation. I tried replacing it
> with /ReadWritePaths/ and threw in /ProtectSystem=True/. (The original
> service file is below.)

> ReadWriteDirectories=/run/rl-web/tmp


I believe the cause of the error is that the directory /run/rl-web/tmp
does not exist when trying to create the namespace. You can only mount
paths that already exist. Why do you have this line anyway? /run is
writable by default, and I don't see anything which would restrict
that. ProtectSystem level "true" does not affect /run.




More information about the systemd-devel mailing list