Installing 8.2 on CentOS 7 - PHP Fatal error - Unable to write in the "cache" directory

Hi all,
This is a brand new install of Suite CRM 8.2 on CentOS 7.9

I keep getting this error even though I have now set permissions to 777.
drwxrwxrwx. 3 apache apache 18 Nov 8 18:21 cache

Any insight would be appreciated.

[Wed Nov 09 02:25:03.442047 2022] [php:error] [pid 11203] [client] PHP Fatal error: Uncaught RuntimeException: Unable to write in the “cache” directory (/var/www/html/suitecrm/cache/prod). in /var/www/html/suitecrm/vendor/symfony/http-kernel/Kernel.php:636\nStack trace:\n#0 /var/www/html/suitecrm/vendor/symfony/http-kernel/Kernel.php(540): Symfony\Component\HttpKernel\Kernel->buildContainer()\n#1 /var/www/html/suitecrm/core/backend/Kernel.php(124): Symfony\Component\HttpKernel\Kernel->initializeContainer()\n#2 /var/www/html/suitecrm/public/index.php(34): App\Kernel->getLegacyRoute()\n#3 {main}\n thrown in /var/www/html/suitecrm/vendor/symfony/http-kernel/Kernel.php on line 636

Apparently on Azure, CentOS is SELinux.
I had to do “setenforce 0” then restart httpd and it works fine.

1 Like