From e7795550fc7e92d8d22098e725ab8a97257751f3 Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Mon, 30 Oct 2023 15:39:12 -0700 Subject: [PATCH] add help message to permissions error output --- bin/docker_entrypoint.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/docker_entrypoint.sh b/bin/docker_entrypoint.sh index b245968f..26d7e9f4 100755 --- a/bin/docker_entrypoint.sh +++ b/bin/docker_entrypoint.sh @@ -22,9 +22,9 @@ if [[ -d "$DATA_DIR/archive" ]]; then rm "$DATA_DIR/archive/.permissions_test_safe_to_delete" # echo "[√] Permissions are correct" else - echo "[X] Permissions Error: ArchiveBox is not able to write to your data dir. You need to fix the data dir ownership and retry:" >2 - echo " chown -R $PUID:$PGID data" >2 - echo " https://docs.linuxserver.io/general/understanding-puid-and-pgid" >2 + echo "[X] Error: ArchiveBox (uid=$PUID) is not able to write to your ./data dir. Fix the permissions and retry:" >2 + echo " \$ chown -R $PUID:$PGID data" >2 + echo " You may need to pass PUID & PGID to the Docker container: https://docs.linuxserver.io/general/understanding-puid-and-pgid" >2 exit 1 fi else @@ -34,7 +34,7 @@ fi chown $ARCHIVEBOX_USER:$ARCHIVEBOX_USER "$DATA_DIR" "$DATA_DIR"/* # Drop permissions to run commands as the archivebox user -if [[ "$1" == /* || "$1" == "echo" || "$1" == "archivebox" ]]; then +if [[ "$1" == /* || "$1" == "bash" || "$1" == "sh" || "$1" == "echo" || "$1" == "archivebox" ]]; then # arg 1 is a binary, execute it verbatim # e.g. "archivebox init" # "/bin/bash"