From ded183b473588075133938a6016a87f6f59f65c8 Mon Sep 17 00:00:00 2001 From: Jason Costomiris Date: Sun, 31 Dec 2023 12:37:59 -0500 Subject: [PATCH 1/2] test fix for /opt/librenms/cache ownership --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index e00be3f8..e859d535 100644 --- a/Dockerfile +++ b/Dockerfile @@ -132,6 +132,7 @@ RUN apk --update --no-cache add -t build-dependencies \ && git reset --hard $WEATHERMAP_PLUGIN_COMMIT \ ) \ && chown -R nobody:nogroup ${LIBRENMS_PATH} \ + && chown -R librenms:librenms ${LIBRENMS_PATH}/cache \ && apk del build-dependencies \ && rm -rf .git \ html/plugins/Test \ From 99fee57d6ddf9f805f02b54f220074f4c24bdfff Mon Sep 17 00:00:00 2001 From: Jason Costomiris Date: Mon, 1 Jan 2024 14:00:25 -0500 Subject: [PATCH 2/2] Remove cache perms fix from Dockerfile, move to script --- Dockerfile | 1 - rootfs/etc/cont-init.d/02-fix-perms.sh | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index e859d535..e00be3f8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -132,7 +132,6 @@ RUN apk --update --no-cache add -t build-dependencies \ && git reset --hard $WEATHERMAP_PLUGIN_COMMIT \ ) \ && chown -R nobody:nogroup ${LIBRENMS_PATH} \ - && chown -R librenms:librenms ${LIBRENMS_PATH}/cache \ && apk del build-dependencies \ && rm -rf .git \ html/plugins/Test \ diff --git a/rootfs/etc/cont-init.d/02-fix-perms.sh b/rootfs/etc/cont-init.d/02-fix-perms.sh index 51786fa4..3b54519f 100644 --- a/rootfs/etc/cont-init.d/02-fix-perms.sh +++ b/rootfs/etc/cont-init.d/02-fix-perms.sh @@ -9,7 +9,8 @@ mkdir -p /data \ chown librenms:librenms \ /data \ "${LIBRENMS_PATH}" \ - "${LIBRENMS_PATH}/.env" + "${LIBRENMS_PATH}/.env" \ + "${LIBRENMS_PATH}/cache" chown -R librenms:librenms \ /home/librenms \ /tpls \