11 lines
328 B
Bash
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
|