0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2025-05-22 23:30:54 +02:00

feature: configurable user ids

Signed-off-by: realies <5107843+realies@users.noreply.github.com>
This commit is contained in:
realies 2025-02-18 03:07:11 +00:00
parent 4daafc8d20
commit 447389a542
8 changed files with 49 additions and 1 deletions

View file

@ -83,6 +83,12 @@ if expr "$1" : "apache" 1>/dev/null; then
fi
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
if [ -n "${UID}" ] && [ -n "${GID}" ]; then
echo "Updating www-data user/group IDs..."
groupmod -o -g "${GID}" www-data
usermod -o -u "${UID}" www-data
fi
uid="$(id -u)"
gid="$(id -g)"
if [ "$uid" = '0' ]; then

View file

@ -83,6 +83,12 @@ if expr "$1" : "apache" 1>/dev/null; then
fi
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
if [ -n "${UID}" ] && [ -n "${GID}" ]; then
echo "Updating www-data user/group IDs..."
groupmod -o -g "${GID}" www-data
usermod -o -u "${UID}" www-data
fi
uid="$(id -u)"
gid="$(id -g)"
if [ "$uid" = '0' ]; then

View file

@ -83,6 +83,12 @@ if expr "$1" : "apache" 1>/dev/null; then
fi
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
if [ -n "${UID}" ] && [ -n "${GID}" ]; then
echo "Updating www-data user/group IDs..."
groupmod -o -g "${GID}" www-data
usermod -o -u "${UID}" www-data
fi
uid="$(id -u)"
gid="$(id -g)"
if [ "$uid" = '0' ]; then