restricts ownership changes to files still owned by root (e.g., from the image build). On subsequent restarts, files already owned by www-data are skipped entirely, avoiding a full recursive write cycle.

This commit is contained in:
2026-06-02 16:24:48 +01:00
parent b4db12f09c
commit cf54575187

View File

@ -54,7 +54,7 @@ if [ ! -f "$UPLOADS_HTACCESS" ]; then
EOF
fi
chown -R www-data:www-data /var/www/html/wp-content/
chown -R --from=root:root www-data:www-data /var/www/html/wp-content/
if [ -n "$@" ]; then
"$@"