DEV Community

Alexandre Freire
Alexandre Freire

Posted on

Fix Permissions Errors from Laravel

When you install Laravel application on server for the first time, probably see error warnings. Usually the motive is folder permissions.

For this reason I have gathered possible actions that will solve your problem.

Create these folders on root of application:

storage/  
storage/app
storage/framework/cache  
storage/framework/session
storage/framework/views
storage/framework/testing
storage/logs
Enter fullscreen mode Exit fullscreen mode

Set the permission

chmod -R 775 storage
php artisan config:cache
Enter fullscreen mode Exit fullscreen mode

now run:

sudo chmod -R 777 bootstrap/cache
php artisan config:cache
Enter fullscreen mode Exit fullscreen mode

if the action results in error try make this directory and after run the command again.

run:

php artisan optimize:clear
Enter fullscreen mode Exit fullscreen mode

Discussion (0)