[systemd-devel] ReadWriteDirectories directive in service file?

Bruce A. Johnson bjohnson at blueridgenetworks.com
Fri Jun 12 01:07:42 UTC 2020


On 11/06/2020 15:39, Uoti Urpala wrote:

    .    .    .

>> 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.
I was specifying /run/rl-web/tmp as being a read-write directory because
I needed the user account that the web service was being run under to
have write access to the tmp directory. By default, it was being set up
as owned by root. But anyway, I've fixed the pre-exec script to take
care of everything, and it seems to work.

Thanks for your response. I sure would like to know what happened to the
ReadWriteDirectories directive, but that's something I'll have to look
up another day.

Bruce A. Johnson
Herndon, Virginia
USA

On 11/06/2020 15:39, Uoti Urpala wrote:
> 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.
>
>
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/systemd-devel



More information about the systemd-devel mailing list