Commit d29a0f61 authored by Peter Parente's avatar Peter Parente Committed by GitHub

Merge pull request #633 from cam72cam/patch-2

Don't chown -R a user's home directory
parents 1085ca05 e10d80d9
...@@ -40,7 +40,12 @@ if [ $(id -u) == 0 ] ; then ...@@ -40,7 +40,12 @@ if [ $(id -u) == 0 ] ; then
# Ex: default NFS/EFS (no auto-uid/gid) # Ex: default NFS/EFS (no auto-uid/gid)
if [[ "$CHOWN_HOME" == "1" || "$CHOWN_HOME" == 'yes' ]]; then if [[ "$CHOWN_HOME" == "1" || "$CHOWN_HOME" == 'yes' ]]; then
echo "Changing ownership of /home/$NB_USER to $NB_UID:$NB_GID" echo "Changing ownership of /home/$NB_USER to $NB_UID:$NB_GID"
chown -R $NB_UID:$NB_GID /home/$NB_USER chown $CHOWN_HOME_OPTS $NB_UID:$NB_GID /home/$NB_USER
fi
if [ ! -z "$CHOWN_EXTRA" ]; then
for extra_dir in $(echo $CHOWN_EXTRA | tr ',' ' '); do
chown $CHOWN_EXTRA_OPTS $NB_UID:$NB_GID $extra_dir
done
fi fi
# handle home and working directory if the username changed # handle home and working directory if the username changed
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment