]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tmpfiles: Order tmpfiles-setup after journald
authorJoão Paulo Rechi Vita <jprvita@endlessm.com>
Tue, 18 Sep 2018 22:03:54 +0000 (15:03 -0700)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 20 Sep 2018 11:20:41 +0000 (13:20 +0200)
systemd-tmpfiles-setup.service needs to be ordered after
systemd-journald.service, so entries in /run/log/journal are already
created when systemd-tmpfiles tries to adjust its permissions.

This is specially problematic for setups using a volatile journal where
the initrd does not ship a machine-id (i.e. OSTree-based systems), where
logs from the initrd will be inaccessible for users in the
systemd-journal group. It also has a side effect of `journalctl --user`
failing with "No journal files were opened due to insufficient
permissions".

Fixes #10128.

units/systemd-tmpfiles-setup.service.in

index 384be59481d72e2f8ce9ce2a2c831e6ae00f31a7..b02bbcd61b7004a481b4b56f4aea278bb8cb8e3c 100644 (file)
@@ -12,7 +12,7 @@ Description=Create Volatile Files and Directories
 Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8)
 DefaultDependencies=no
 Conflicts=shutdown.target
-After=local-fs.target systemd-sysusers.service
+After=local-fs.target systemd-sysusers.service systemd-journald.service
 Before=sysinit.target shutdown.target
 RefuseManualStop=yes