Filesystem
Laravel 8
Laravel 9
Laravel 10
Laravel 11
Laravel 12
Laravel Storage Permission Denied - Fix Permissions
This error occurs when Laravel cannot write to the storage or bootstrap/cache directories due to insufficient file permissions.
The Error
Error Message
Permission denied - Unable to write to storage
Common Causes
- 1 Incorrect directory permissions
- 2 Web server user doesn't own directories
- 3 SELinux or AppArmor restrictions
- 4 Deployment created files with wrong owner
Solutions
1
Set correct permissions on storage and cache
Bash
sudo chmod -R 775 storage bootstrap/cache
sudo chown -R $USER:www-data storage bootstrap/cache
2
For production environments
Bash
sudo chown -R www-data:www-data storage bootstrap/cache
sudo chmod -R 775 storage bootstrap/cache
3
Create storage link
Bash
php artisan storage:link
Need Help With Your Laravel Project?
I specialize in building custom Laravel applications, process automation, and SaaS development. Whether you need to eliminate repetitive tasks or build something from scratch, let's discuss your project.
About Hafiz
Senior Full Stack Developer. I build production software with Laravel, Filament, Vue, and AI integrations, and write about the real decisions behind shipping it.
Get in touch →