Red Hat and CentOS issues with permissions

I had a server that was running Red Hat that threw an error of:

PHP Fatal error: Uncaught exception ‘Zend_Cache_Exception’ with message ‘cache_dir ” is not writable

The directory it was trying to write to had the apache user as a group member, and group members had write permissions.  I even changed the permissions to 777 just to try to fix the issue.

It turned out to be an issue with SULinux and permissions.  By using this command

chcon -R -t httpd_sys_content_rw_t {Directory to let apache write to here}

The issue was fixed.

Leave a Reply

Your email address will not be published. Required fields are marked *