Skip to content

Commit eca72d2

Browse files
committed
fix incorrect /data ownership
1 parent 1fbcbae commit eca72d2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Containerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,10 @@ RUN for dir in /etc/icinga2 /var/cache/icinga2 /var/lib/icinga2 /var/log/icinga2
167167
ln -vs "/data$dir" "$dir"; \
168168
done
169169

170+
# The below prepare-dirs script will not fix any permissions issues for the actuall /var/lib/icinga2 or
171+
# /var/etc/icinga2 directories, so we need to set the correct ownership for the /data directory recursively.
172+
RUN chown -R icinga:icinga /data
173+
170174
# Run the prepare-dirs script to create non-existing directories and set the correct permissions for them.
171175
# It's invoked in the same way as in the systemd unit file in a Debian package, so this will ensure that
172176
# all the necessary directories are created with the correct permissions and ownership.

0 commit comments

Comments
 (0)