代码之家  ›  专栏  ›  技术社区  ›  fightstarr20

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

  •  0
  • fightstarr20  · 技术社区  · 6 年前

    我有一个laravel5.5应用程序,我正试图部署到amazonelasticbeanstalk实例。

    上传过程去寻找,我可以访问该网站,我需要初始化数据库,所以我登录到ec2用户的实例,并运行以下命令。。

    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 回复  |  直到 6 年前
        1
  •  1
  •   Jignesh Joisar    6 年前

    设置权限

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