mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-12 04:22:58 +00:00
Merge pull request #541 from cam72cam/cam72cam-chown-home
Support provisioned storage with incorrect permissions
This commit is contained in:
@@ -18,6 +18,13 @@ if [ $(id -u) == 0 ] ; then
|
||||
echo "Set username to: $NB_USER"
|
||||
usermod -d /home/$NB_USER -l $NB_USER jovyan
|
||||
|
||||
# Handle case where provisioned storage does not have the correct permissions by default
|
||||
# Ex: default NFS/EFS (no auto-uid/gid)
|
||||
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
|
||||
# changing username, make sure homedir exists
|
||||
|
Reference in New Issue
Block a user