[systemd-devel] [PATCH RFC] namespace: make sure ReadWriteDirectories are actually writable

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Fri Dec 27 08:52:16 PST 2013


On Fri, Dec 27, 2013 at 10:18:30AM +0100, Michael Olbrich wrote:
> Currently adding directories to ReadWriteDirectories= only restores the
> original mount flags. So e.g. setting ReadOnlyDirectories=/usr and
> ReadWriteDirectories=/usr/local works as expected if the underlying file
> system was writable. However, setting ReadWriteDirectories= has no effect
> if the underlying file system is mounted read-only.
> This patch changes that by explicitly remounting the bind mount.
This doesn't feel right. This means that running any service with ReadWriteDirectories
set would mean mounting partitions rw. That would be a significant change
of semantics for current users. I think you should have an fstab entry
with the rw flag. You can use noauto and it won't be mounted by default,
and systemd should mount it automatically for you if you start the service.

It would be nice to mention the status quo in the documentation though.
I'd be happy to take a patch for that.

Zbyszek


More information about the systemd-devel mailing list