Fix permissions script to chown entire project directory and use chmod -R

This commit is contained in:
root
2026-06-10 12:15:06 +02:00
parent 5288dbd917
commit 3b3551d48c
16 changed files with 214 additions and 213 deletions
+3 -4
View File
@@ -9,11 +9,10 @@ echo "Fixing permissions..."
# Fix ownership (only if running as root/sudo, skip otherwise)
if [ "$(id -u)" -eq 0 ]; then
chown -R "$WEB_USER":"$WEB_USER" storage bootstrap/cache 2>/dev/null || true
chown -R "$WEB_USER":"$WEB_USER" "$PROJECT_DIR" 2>/dev/null || true
fi
# Fix directory permissions
find storage bootstrap/cache -type d -exec chmod 775 {} + 2>/dev/null || true
find storage bootstrap/cache -type f -exec chmod 664 {} + 2>/dev/null || true
# Fix directory permissions for writable paths
chmod -R 775 storage bootstrap/cache 2>/dev/null || true
echo "Permissions fixed."