File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -57,8 +57,17 @@ if [ "$1" = 'frankenphp' ] || [ "$1" = 'php' ] || [ "$1" = 'bin/console' ]; then
57
57
fi
58
58
fi
59
59
60
- setfacl -R -m u:www-data:rwX -m u:" $( whoami) " :rwX var
61
- setfacl -dR -m u:www-data:rwX -m u:" $( whoami) " :rwX var
60
+ SETFACL_STATUS=0
61
+ SETFACL_ERROR=$( setfacl -m u:www-data:rwX -m u:" $( whoami) " :rwX var 2>&1 1> /dev/null) || SETFACL_STATUS=$?
62
+ if [ $SETFACL_STATUS -eq 0 ]; then
63
+ setfacl -R -m u:www-data:rwX -m u:" $( whoami) " :rwX var
64
+ setfacl -dR -m u:www-data:rwX -m u:" $( whoami) " :rwX var
65
+ elif echo " $SETFACL_ERROR " | grep -q " Operation not supported" ; then
66
+ # https://github.com/maelgangloff/domain-watchdog/issues/74
67
+ chown -R " $( whoami) " :www-data var
68
+ else
69
+ echo " $SETFACL_ERROR " >&2
70
+ fi
62
71
63
72
echo ' PHP app ready!'
64
73
fi
You can’t perform that action at this time.
0 commit comments