From eca72d2c3dd64d0148961bc10dd47033a7bac7b9 Mon Sep 17 00:00:00 2001 From: Yonas Habteab Date: Tue, 22 Jul 2025 11:48:37 +0200 Subject: [PATCH] fix incorrect `/data` ownership --- Containerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Containerfile b/Containerfile index 67c87473e..ff3abdbad 100644 --- a/Containerfile +++ b/Containerfile @@ -167,6 +167,10 @@ RUN for dir in /etc/icinga2 /var/cache/icinga2 /var/lib/icinga2 /var/log/icinga2 ln -vs "/data$dir" "$dir"; \ done +# The below prepare-dirs script will not fix any permissions issues for the actuall /var/lib/icinga2 or +# /var/etc/icinga2 directories, so we need to set the correct ownership for the /data directory recursively. +RUN chown -R icinga:icinga /data + # Run the prepare-dirs script to create non-existing directories and set the correct permissions for them. # It's invoked in the same way as in the systemd unit file in a Debian package, so this will ensure that # all the necessary directories are created with the correct permissions and ownership.