diff --git a/assets/runtime/functions b/assets/runtime/functions index 6e72ad85..9a4d2986 100644 --- a/assets/runtime/functions +++ b/assets/runtime/functions @@ -1316,7 +1316,7 @@ map_uidgid() { echo "Mapping UID and GID for ${GITLAB_USER}:${GITLAB_USER} to $USERMAP_UID:$USERMAP_GID" groupmod -o -g ${USERMAP_GID} ${GITLAB_USER} sed -i -e "s|:${USERMAP_ORIG_UID}:${USERMAP_GID}:|:${USERMAP_UID}:${USERMAP_GID}:|" /etc/passwd - find ${GITLAB_HOME} -path ${GITLAB_DATA_DIR}/\* -prune -o -print0 | xargs -0 chown -h ${GITLAB_USER}: + find ${GITLAB_HOME} -path ${GITLAB_DATA_DIR}/\* \( ! -uid ${USERMAP_ORIG_UID} -o ! -gid ${USERMAP_ORIG_GID} \) -print0 | xargs -0 chown -h ${GITLAB_USER}: ${GITLAB_HOME} fi }