Skip to content

Commit

Permalink
add help message to permissions error output
Browse files Browse the repository at this point in the history
  • Loading branch information
pirate authored Oct 30, 2023
1 parent e2bcb19 commit e779555
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bin/docker_entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down

0 comments on commit e779555

Please sign in to comment.