Gate chown /home/$NB_USER behind $CHOWN_HOME

This commit is contained in:
Christian Mesh
2018-01-31 09:05:01 -05:00
committed by GitHub
parent b4d2d6f583
commit 272476e2d7

View File

@@ -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