I am having a hard time deploying a PHP website built using Grav on CentOS.
Whenever I try to open the website I get 500 Server Error. The logs say:
Uncaught exception 'RuntimeException' with message 'Creating directory '/var/www/html/glug_site/cache//compiled/files' failed on error mkdir(): Permission denied' in /var/www/html/glug_site/vendor/rockettheme/toolbox/File/src/File.php:420
Stack trace:\...
I followed the guide mentioned here but it didn't helped.
Then, I did chmod 777 -R glug_nith/
but still it doesn't work. I even logged into apache
user using sudo -u apache bash
to see if I am able to create folders and files inside myapp and I was successful. I tried deleting the .htaccess
file to see if that would help but it didn't.
I cannot understand instead of having all the permission why its showing permission denied. Also I couldn't find any thing that might be blocking the permission. Please help.