Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Fix Laravel log file permission errors after deployment. Use when seeing "UnexpectedValueException: Permission denied" for storage/logs/laravel.log, or after any deployment that may change file ownership. Triggers on: laravel, log permissions, www-data, storage/logs, permission denied.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -43% | 0% |
| case-03 | ✗→✓ | ▲ Improved | -44% | 0% |
| case-05 | ✗→✓ | ▲ Improved | -30% | 0% |
| case-09 | ✗→✓ | ▲ Improved | -17% | 0% |
| case-13 | ✗→✓ | ▲ Improved | -39% | 0% |
UnexpectedValueException: .../storage/logs/laravel.log Permission deniedroot instead of www-databash# Fix ownership sudo chown -R www-data:www-data /var/www/storage/logs/ # Restart PHP-FPM (adjust version as needed) sudo systemctl restart php8.2-fpm
Or use the script: scripts/fix-perms.sh <ssh-host>
Deployment runs as root, creating or modifying log files with root ownership. The web server (www-data) then can't write to them.
Add to post-deploy hook:
bashchown -R www-data:www-data /var/www/storage/logs/
Other measured skills in the registry, with their headline benchmark lift.