Symfony No Access to Cache - Red Hat 7

I'm running amazon EC2 VPC, normaly use Centos and I have no problem with it, but I have tried Red Hat Enterprise Linux Server release 7.1, and I have installed everything from scratch.

I'm using Symfony 2.7.5, and I really struggling with the cache.

The web application seams to not have access to the cache folder (app/cache)

RuntimeException in bootstrap.php.cache line 2671: Unable to create the cache directory (/var/www/mysite/app/cache/dev)

I have researched a lot and tried all, change ownership, give full accesss to the folder cache...

chown -R root:apache app/cache
chown -R root:apache app/logs

chmod -R 777 app/cache
chmod -R 777 app/logs

sudo setfacl -R -m u:apache:rwX -m u:ec2-user:rwX app/cache app/logs
sudo setfacl -dR -m u:apache:rwx -m u:ec2-user:rwx app/cache app/logs

In the command line I can use php app/console cache:clear and it works. I dont know if its a problem with this Symfony's version or its some kind configuration problem. Thanks for the help.


I faced the same problem and I fixed it by disabling SELinux in this file /etc/selinux/config I know it's not the best solution because SELinux allows additional security, but this helps to overpass the problem until you find the best one.

Need Your Help

PHP: What is the difference between exit()/die() and return; within "self" and included files?

php return exit die

Am am still on a PHP learning curb. When terminating a script, what is the difference between exit();/die(); and return;?:

How to reduce Liferay 6 startup time

liferay-6 startup

Liferay 6.1 takes roughly 60-120 seconds to start on my developer machine. Unfortunately we have to start Liferay very often, so this delay hurts. Actually, most features of Liferay aren't needed b...