Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/243.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php symfony2缓存/日志权限问题_Php_Apache_Caching_Symfony_Permissions - Fatal编程技术网

Php symfony2缓存/日志权限问题

Php symfony2缓存/日志权限问题,php,apache,caching,symfony,permissions,Php,Apache,Caching,Symfony,Permissions,我刚刚在生产服务器上上传了一个简单的symfony2应用程序,我发现以下配置错误: 2 MAJOR PROBLEMS Change the permissions of the "app/cache/" directory so that the web server can write into it. Change the permissions of the "app/logs/" directory so that the web server can write into it. 使

我刚刚在生产服务器上上传了一个简单的symfony2应用程序,我发现以下配置错误:

2 MAJOR PROBLEMS
Change the permissions of the "app/cache/" directory so that the web server can write into it.
Change the permissions of the "app/logs/" directory so that the web server can write into it.
使用:umask(0000)编辑“app/console”、“web/app.php”和“web/app_dev.php”不起作用,如果我用FileZIlla右键单击该文件夹,它们的权限已经是777。那么呢


谢谢…

您很可能需要递归设置权限。我猜FileZilla有这个选项,如果没有,则将ssh放入框中并运行(用实际路径替换/path/to)


旁注:将权限设置为777通常是一个非常糟糕的主意。

umask(0000)
实际上不会增加脚本的可用权限。它只是确保可以从命令行和web服务器访问由这些脚本创建的文件和目录。如果您不使用命令行,您可能根本不需要它。

您有shell访问权限吗?我不会对此投反对票,但如果将权限设置为777(通常不是每次)是个坏主意,您永远不应该建议这样做
sudo chmod 777 -R /path/to/app/cache
sudo chmod 777 -R /path/to/app/logs