Skip to content

Commit

Permalink
Gate chown /home/$NB_USER behind $CHOWN_HOME
Browse files Browse the repository at this point in the history
  • Loading branch information
cam72cam authored Jan 31, 2018
1 parent b4d2d6f commit 272476e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion base-notebook/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ if [ $(id -u) == 0 ] ; then

# Handle case where provisioned storage does not have the correct permissions by default
# Ex: default NFS/EFS (no auto-uid/gid)
chown $NB_UID:$NB_GID /home/$NB_USER
if [[ "$CHOWN_HOME" == "1" || "$CHOWN_HOME" == 'yes' ]]; then
echo "Changing ownership of /home/$NB_USER to $NB_UID:$NB_GID"
chown $NB_UID:$NB_GID /home/$NB_USER
fi

# handle home and working directory if the username changed
if [[ "$NB_USER" != "jovyan" ]]; then
Expand Down

0 comments on commit 272476e

Please sign in to comment.