diff --git a/frankenphp/docker-entrypoint.sh b/frankenphp/docker-entrypoint.sh index 82cb1ff58..444bdfe51 100755 --- a/frankenphp/docker-entrypoint.sh +++ b/frankenphp/docker-entrypoint.sh @@ -57,8 +57,17 @@ if [ "$1" = 'frankenphp' ] || [ "$1" = 'php' ] || [ "$1" = 'bin/console' ]; then fi fi - setfacl -R -m u:www-data:rwX -m u:"$(whoami)":rwX var - setfacl -dR -m u:www-data:rwX -m u:"$(whoami)":rwX var + SETFACL_STATUS=0 + SETFACL_ERROR=$(setfacl -m u:www-data:rwX -m u:"$(whoami)":rwX var 2>&1 1>/dev/null) || SETFACL_STATUS=$? + if [ $SETFACL_STATUS -eq 0 ]; then + setfacl -R -m u:www-data:rwX -m u:"$(whoami)":rwX var + setfacl -dR -m u:www-data:rwX -m u:"$(whoami)":rwX var + elif echo "$SETFACL_ERROR" | grep -q "Operation not supported"; then + # https://github.com/maelgangloff/domain-watchdog/issues/74 + chown -R "$(whoami)":www-data var + else + echo "$SETFACL_ERROR" >&2 + fi echo 'PHP app ready!' fi