I am trying to setup Symfony2 on my Vagrant virtual machine.
When navigating to BASE_RULE/web/app_dev.php
, this is the permission error I am receiving:
RuntimeException: Failed to write cache file "/var/www/app/cache/dev/classes.php".
Reading various StackOverflow threads and trying many different proposed solutions, people recommended me to use this Symfony2 Permissions article.
I have tried number 2
, but since my system does not support chmod +a
, I moved onto number 3
:
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 app/cache app/logs
sudo setfacl -dR -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX app/cache app/logs
When I execute the setfacl
commands, here are the following errors:
vagrant@order-online:/var/www/app$ sudo setfacl -R -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX cache logs
setfacl: cache: Operation not supported
setfacl: cache/.DS_Store: Operation not supported
setfacl: cache/dev: Operation not supported
setfacl: cache/dev/annotations: Operation not supported
setfacl: cache/dev/appDevDebugProjectContainer.php: Operation not supported
setfacl: cache/dev/appDevDebugProjectContainer.php.meta: Operation not supported
setfacl: cache/dev/appDevDebugProjectContainer.xml: Operation not supported
setfacl: cache/dev/appDevDebugProjectContainerCompiler.log: Operation not supported
So this one didn't work (or I am missing something..), so I moved onto number 4
, which is setting umask(0000);
under app/console, web/app.php and web/app_dev.php
.
After applying that change in those three file locations, I cleared my cache, restarted Vagrant and Apache, but still received the same errors.
Thanks.