Skip to content

Commit

Permalink
fix: don't chown when download dir writeable (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
gnattu authored Sep 6, 2022
1 parent e877015 commit e916a58
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rootfs/etc/cont-init.d/58-permissions
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
# See /LICENSE for more information.

. /etc/init-base
chown -R p3terx:p3terx ${DOWNLOAD_DIR}
if [ -w ${DOWNLOAD_DIR} ]; then echo "Download DIR writeable, not changing owner."; else chown -R p3terx:p3terx ${DOWNLOAD_DIR}; fi
chown -R p3terx:p3terx ${ARIA2_CONF_DIR}
if [[ -z ${PUID} && -z ${PGID} ]] || [[ ${PUID} = 65534 && ${PGID} = 65534 ]]; then
echo -e "${WARN} Ignore permission settings."
chmod -v 777 ${DOWNLOAD_DIR}
chmod -vR 777 ${ARIA2_CONF_DIR}
else
chmod -v u=rwx ${DOWNLOAD_DIR}
if [ -w ${DOWNLOAD_DIR} ]; then echo "Download DIR writeable, not modifying permission."; else chmod -v u=rwx ${DOWNLOAD_DIR}; fi
chmod -v 600 ${ARIA2_CONF_DIR}/*
chmod -v 755 ${SCRIPT_DIR}
chmod -v 700 ${SCRIPT_DIR}/*
Expand Down

0 comments on commit e916a58

Please sign in to comment.