independent full stack developer

/ Developer's blog

HotFix: Laravel - Failed to open stream: Permission denied

Sunday, December 03, 2023

#laravel #error

Sometimes it happens :) if you stumbled with error about file_get_content and permission denied - failed to open the stream in Laravel 5, try these commands, and everything should be fixed. Try this code if the error occurs on the localhost and dev server.

php artisan cache:clear
chmod -R 777 storage/
composer dump-autoload


I forgot to say that we should avoid 777 chmod on production, if you get this error on your production live stage - try to set 755 instead.


29133 people already saw it