Laravel 5.5-部署到Elastic Beanstalk,db:seed未运行

时间:2018-10-08 14:02:15

标签: laravel laravel-5

我有一个Laravel 5.5应用程序,我正在尝试将其部署到Amazon Elastic Beanstalk实例。

找到上传过程,我可以访问该站点,我需要初始化数据库,因此我以ec2-user身份登录该实例并运行以下命令。

php artisan migrate
php artisan db:seed

第一个命令正确执行,并使用正确的表填充数据库,但是第二个命令不起作用,并给我错误...

The stream or file "/var/app/current/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied

有人知道我要去哪里错吗?

1 个答案:

答案 0 :(得分:1)

设置权限

sudo chmod  -R 755 /var/app/current/storage

sudo chmod -R 0777 /var/app/current/storage/logs/*