Files
DOCKER_PHP_BASE/fmp-alpine/entrypoint.d/05-permissions.sh
T
2026-10-31 19:28:45 +01:00

11 lines
328 B
Bash

#!/bin/sh
# Mounted volumes are usually root-owned, so www-data could not write into storage and bootstrap/cache.
cd "${APP_ROOT:-/var/www/html}" || exit 0
for dir in storage bootstrap/cache; do
if [ -d "$dir" ] && [ "$(stat -c %U "$dir")" != "www-data" ]; then
chown -R www-data:www-data "$dir"
fi
done
exit 0