From a8eade4dd0ebb0bed80bb345c1224b84348f70ac Mon Sep 17 00:00:00 2001 From: Matteo Giordano Date: Wed, 8 Nov 2023 13:13:25 +0100 Subject: [PATCH] Fix archivebox user UID & GID --- bin/docker_entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/docker_entrypoint.sh b/bin/docker_entrypoint.sh index 23cb7e91..3f3654be 100755 --- a/bin/docker_entrypoint.sh +++ b/bin/docker_entrypoint.sh @@ -13,8 +13,8 @@ export DETECTED_GID="$(stat -c '%g' "$DATA_DIR/logs/errors.log" 2>/dev/null || e # Set the archivebox user to use the configured UID & GID # prefers PUID and PGID env vars passsed in explicitly, falls back to autodetected defaults -groupmod -o -g "${PUID:-$DETECTED_UID}" "$ARCHIVEBOX_USER" > /dev/null 2>&1 -usermod -o -u "${PGID:-$DETECTED_GID}" "$ARCHIVEBOX_USER" > /dev/null 2>&1 +usermod -o -u "${PUID:-$DETECTED_UID}" "$ARCHIVEBOX_USER" > /dev/null 2>&1 +groupmod -o -g "${PGID:-$DETECTED_GID}" "$ARCHIVEBOX_USER" > /dev/null 2>&1 # re-set PUID and PGID to values reported by system instead of values we tried to set, # in case wonky filesystems or Docker setups try to play UID/GID remapping tricks on us