diff --git a/12.0/apache/docker-entrypoint.sh b/12.0/apache/docker-entrypoint.sh index 9298bb47..3c905af9 100755 --- a/12.0/apache/docker-entrypoint.sh +++ b/12.0/apache/docker-entrypoint.sh @@ -13,7 +13,9 @@ function directory_empty() { function run_as() { if [[ $EUID -eq 0 ]]; then - su - www-data -s /bin/bash -c "$1" + HOME="/var/www" + su - www-data -p -s /bin/bash -c "$1" + HOME="/root" else bash -c "$1" fi diff --git a/12.0/fpm/docker-entrypoint.sh b/12.0/fpm/docker-entrypoint.sh index 9298bb47..3c905af9 100755 --- a/12.0/fpm/docker-entrypoint.sh +++ b/12.0/fpm/docker-entrypoint.sh @@ -13,7 +13,9 @@ function directory_empty() { function run_as() { if [[ $EUID -eq 0 ]]; then - su - www-data -s /bin/bash -c "$1" + HOME="/var/www" + su - www-data -p -s /bin/bash -c "$1" + HOME="/root" else bash -c "$1" fi