I have run this lines:
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 -Rn -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX app/cache app/logs
sudo setfacl -dRn -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX app/cache app/logs
but my server (apache) can not write in the cache/
directory... This is the error:
PHP Fatal error: Uncaught exception 'RuntimeException' with message 'Unable to create the cache directory (/home/tirengarfio/workspace/nataliacanellas/app/cache/dev)\n' in /home/tirengarfio/workspace/nataliacanellas/app/bootstrap.php.cache:2471\nStack trace:\n#0 /home/tirengarfio/workspace/nataliacanellas/app/bootstrap.php.cache(2432): Symfony\Component\HttpKernel\Kernel->buildContainer()\n#1 /home/tirengarfio/workspace/nataliacanellas/app/bootstrap.php.cache(2212): Symfony\Component\HttpKernel\Kernel->initializeContainer()\n#2 /home/tirengarfio/workspace/nataliacanellas/app/bootstrap.php.cache(2243): Symfony\Component\HttpKernel\Kernel->boot()\n#3 /home/tirengarfio/workspace/nataliacanellas/web/app_dev.php(29): Symfony\Component\HttpKernel\Kernel->handle(Object(Symfony\Component\HttpFoundation\Request))\n#4 {main}\n thrown in /home/tirengarfio/workspace/nataliacanellas/app/bootstrap.php.cache on line 2471
Of course, I installed acl and added this:
`UUID=857ea3b1-a007-483c-83be-71f77c6455b7 / ext4 errors=remount-ro,acl 0 1
`
and remount /
.
I have also tried this:
<?php
umask(0000); // This will let the permissions be 0777
inside app/console
, web/app_dev.php
and web/app.php
, but the error is still the same.
getfacl app/cache
? Is your apache running under an unusual username? Did you check if the fs is mounted withacl
? You can do this by runningmount
and check for theacl
in the output. – ferdynatormount
: gist.github.com/Ziiweb/9808946 – ziiweb