From 8d596006ddf43b54ba6a9e2589cc67dea8afc4fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Sat, 20 Jul 2013 17:07:26 +0200 Subject: [PATCH] Ensure /var/log/journal permission bits are set Ensure permission bits are (re)set on each system activation with explicit chmod call. mkdir -m MODE PATH will only set the permission bits if PATH is *created*, which means users that have old NixOS versions will continue to have the old 700 permissions on /var/log/journal until they chmod manually. With this commit the permissions will be set to 755 on system activation. --- modules/system/boot/systemd.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/system/boot/systemd.nix b/modules/system/boot/systemd.nix index c8289ed36741..900cbfd0cd51 100644 --- a/modules/system/boot/systemd.nix +++ b/modules/system/boot/systemd.nix @@ -563,7 +563,9 @@ in system.activationScripts.systemd = stringAfter [ "groups" ] '' - mkdir -m 0755 -p /var/lib/udev /var/log/journal + mkdir -m 0755 -p /var/lib/udev + mkdir -p /var/log/journal + chmod 0755 /var/log/journal # Regenerate the hardware database /var/lib/udev/hwdb.bin # whenever systemd changes.