Reputation: 9362
I have recently update my application to use symfony 2.6 and now I am getting errors clearing the dev and prod cache:
[RuntimeException]
Unable to write in the "/var/www/project/app/../var/cache/pro_" directory
or
[RuntimeException]
Unable to write in the "/var/www/project/app/../var/cache/de_" directory
However when the pro_
or the de_
folders dont exist the command runs just fine. I set up the folder using the ACL permissions:
HTTPDUSER=`ps aux | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1`
sudo setfacl -R -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX var/
sudo setfacl -dR -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX var/
Im also using the symfony 3.0 structure if that makes a difference.
UPDATE:
I have tried using the umask(0000);
option and the command still fails. Same errors.
Any help or suggestions on what would be causing these commands to fail would be greatly appreciated.
Upvotes: 0
Views: 387
Reputation: 5864
You're digging into https://github.com/symfony/symfony/issues/12893
It seems you need to wait a bugfix or dowgrade on a 2.x directory structure.
Upvotes: 1