#!/bin/sh # Ensure the uploads directory exists and is writable by www-data (PHP-FPM). # Bind-mounted volumes keep host ownership, so we fix permissions at startup. mkdir -p /var/www/html/uploads/posts chown -R www-data:www-data /var/www/html/uploads exec "$@"