Skip to content

Instantly share code, notes, and snippets.

@ilhamsj
Created June 9, 2021 13:47
Show Gist options
  • Save ilhamsj/d5ad1658dfdee179eb76be51cc66f385 to your computer and use it in GitHub Desktop.
Save ilhamsj/d5ad1658dfdee179eb76be51cc66f385 to your computer and use it in GitHub Desktop.
laravel error could not be opened in append mode: failed to open stream: Permission denied on CentOs 8
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!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment