Permissions Issue with Laravel on CentOS

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!

Leave a Comment