Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions frankenphp/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down