PHP Fatal Error on 'php artisan migrate' on remote AWS EB instance: laravel.log: Permission denied

只愿长相守 提交于 2019-12-11 17:27:28

问题


When I SSH into my AWS EB instance to run php artisan migrate, I get the following error message:

Link to bigger size of picture below

I am completely confused. First, I don't get this error on the local server. Second, what does a simple log file have to do with migrations anyway? They are ignored by git by default, so no log files are uploaded.

Sigh... Any ideas on how I can be allowed to run my php artisan migrate?


回答1:


It's always the storage folder. Blank pages or permission denied, it's the darn storage folder.

I don't know how EB works, if it's a regular distro or what, but you should change ownership of the storage folder to the web server (www-data most likely) so it can build the views then set 775 permission so you can write/read logs.

So something like:

sudo chown -R www-data:www-data storage/
sudo chmod -R 775 storage/


来源:https://stackoverflow.com/questions/30539031/php-fatal-error-on-php-artisan-migrate-on-remote-aws-eb-instance-laravel-log

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!