mirror of
https://github.com/ArchiveBox/ArchiveBox
synced 2024-11-22 20:23:12 +00:00
add help message to permissions error output
This commit is contained in:
parent
e2bcb19603
commit
e7795550fc
1 changed files with 4 additions and 4 deletions
|
@ -22,9 +22,9 @@ if [[ -d "$DATA_DIR/archive" ]]; then
|
||||||
rm "$DATA_DIR/archive/.permissions_test_safe_to_delete"
|
rm "$DATA_DIR/archive/.permissions_test_safe_to_delete"
|
||||||
# echo "[√] Permissions are correct"
|
# echo "[√] Permissions are correct"
|
||||||
else
|
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 "[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 " \$ chown -R $PUID:$PGID data" >2
|
||||||
echo " https://docs.linuxserver.io/general/understanding-puid-and-pgid" >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
|
exit 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
@ -34,7 +34,7 @@ fi
|
||||||
chown $ARCHIVEBOX_USER:$ARCHIVEBOX_USER "$DATA_DIR" "$DATA_DIR"/*
|
chown $ARCHIVEBOX_USER:$ARCHIVEBOX_USER "$DATA_DIR" "$DATA_DIR"/*
|
||||||
|
|
||||||
# Drop permissions to run commands as the archivebox user
|
# 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
|
# arg 1 is a binary, execute it verbatim
|
||||||
# e.g. "archivebox init"
|
# e.g. "archivebox init"
|
||||||
# "/bin/bash"
|
# "/bin/bash"
|
||||||
|
|
Loading…
Reference in a new issue