Skip to content

setfacl operation not supported on Synology #793

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
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