0

我安装 Symfony 并执行以下操作:

chmod -R 777 app/cache app/log

从浏览器打开 - 一切都很好!当转到控制台并执行以下操作时:

php app/console cache:clear

并得到错误我没有删除文件的权限。好的,我会用 sudo 来做:

sudo php app/console cache:clear

伟大的!但...

在浏览器中我得到:

RuntimeException: Failed to write cache file

4

1 回答 1

0

Probably you should do 2 things:

  1. Make sure that you are running you web-server from the same user as you are.
  2. Change owner or permission to the directory, in which your project is stored.

I'll explain point 2 little deeply.

Usually you create projects in /var/www folder. So, sudo chmod -R 755 /var/www would fix your issue.

P.S. Next time you should provide more details on your configuration setup. At least, some ls -l and pwd would help us to give you proper answer faster.

Cheers ;)

于 2012-07-28T19:08:50.160 回答