1

When deploying symfony2 to the web it still thinks im using local folders for instant..

[public]$ php app/console cache:clear --env=prod --no-debug
[RuntimeException]
Unable to write in the "C:/Users/brent.french/Documents/www/clients/app/app/cache/prod" directory

I tried following http://symfony.com/doc/current/cookbook/deployment-tools.html with no success any ideas?

1
  • you need to pass your folder cache/prod as 775 (i guess) Commented Apr 15, 2014 at 14:27

2 Answers 2

1

FROM SSH :

USING ACL ON A SYSTEM SUPPORTING chmod +a

rm -rf app/cache/*
rm -rf app/logs/*

sudo chmod +a "www-data allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs
sudo chmod +a "yourname allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs


USING ACL ON A SYSTEM NOT SUPPORTING chmod +a

sudo setfacl -R -m u:www-data:rwx -m u:yourname:rwx app/cache app/logs
sudo setfacl -dR -m u:www-data:rwx -m u:yourname:rwx app/cache app/logs


Without using ACL

just after your opening PHP tag in : "app/console", "web/app.php" and "web/app_dev.php" add :

umask(0002); // This will let the permissions be 0775
// or
umask(0000); // This will let the permissions be 0777

Source : Symfony Doc

Sign up to request clarification or add additional context in comments.

Comments

0

Deleted the app/cache/* folder to remove any old information and this fixed it.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.