Marketing AutomationMautic
0

Mautic error – unable to create the cache directory

I encountered this error after a fresh install of Mautic on CentOS 7.
When I checked the error log file, here’s what I found

RuntimeException: Unable to create the cache directory (/var/www/html/app/cache/prod)\n - in file /var/www/html/app/AppKernel.php - at line 536

This error is due to write permission issue.

Solutions:

Run the following commands

#Set the ownership to apache
sudo chown apache:apache -R /data/www/html/

# Allow write only to specific dirs
sudo chcon -t httpd_sys_rw_content_t /var/www/html/app/logs -R
sudo chcon -t httpd_sys_rw_content_t /var/www/html/app/cache -R
sudo chcon -t httpd_sys_rw_content_t /var/www/html/app/config -R

Leave a Reply