luceos
Yep, I know, but it was part of my troubleshooting process.
Regarding the issue at hand. Thanks for the pointers. I'll leave the steps I had to do in order to fix the issue so new users can find it easily.
I was logged in as root at the time and issued the following commands:
# Give permissions to apache
chown apache:apache -R /var/www/html/flarum
#Allow SELinux to serve content
chcon -t httpd_sys_content_t /var/www/html/flarum/ -R
#Allow write to specific dirs
chcon -t httpd_sys_rw_content_t /var/www/html/wflarum
chcon -t httpd_sys_rw_content_t /var/www/html/flarum/assets/ -R
chcon -t httpd_sys_rw_content_t /var/www/html/flarum/storage/ -R
As an alternative, you can set SELinux to "Permissive":
# Edit SELinux config
nano /etc/selinux/config
#Change from enforcing to permissive:
SELINUX=permissive
We then need to reboot
and check operation mode with getenforce
:
[root@s5 ~]# getenforce
Permissive
And finally change flarum ownership to apache:
chown apache:apache -R /var/www/html/flarum
Thanks luceos for pointing me in the right direction!
Cheers