diff --git a/root/setup.sh b/root/setup.sh index 70710e3..e50fed9 100644 --- a/root/setup.sh +++ b/root/setup.sh @@ -190,6 +190,15 @@ function finalize_ownership() { # and also to the `ADD` instruction in the `Containerfile`. chown -R runner:runner /home/runner chown -R podman:podman /home/podman + + # Ensure correct permissions of system configuration files. + # Somehow these can be set incorrectly during Containerfile + # ADD instruction. + local path + for path in "/etc/systemd/system.conf.d" "/etc/systemd/system/user-.slice.d"; do + chown root:root ${path}/* + chmod 0644 ${path}/* + done } check_vars