Permissions Issue with Laravel on CentOS

前端 未结 6 2038
隐瞒了意图╮
隐瞒了意图╮ 2020-12-01 00:35

I\'ve cloned a laravel repo to my CentOS 7 box. When I try to run it, I get a 500 error with nothing displayed.

So I check out /var/log/httpd/error_log

6条回答
  •  无人及你
    2020-12-01 01:10

    Turns out the issue is with selinux

    I found this answer, which solved my problem.

    Prove this is the problem by turning off selinux with the command

    setenforce 0
    

    This should allow writing, but you've turned off added security server-wide. That's bad. Turn SELinux back

    setenforce 1
    

    Then finally use SELinux to allow writing of the file by using this command

    chcon -R -t httpd_sys_rw_content_t storage
    

    And you're off!

提交回复
热议问题