在Linux中运行CakePHP 3.0时遇到文件权限错误

时间:2015-10-20 04:44:24

标签: linux cakephp cakephp-3.0

我能够在Linux中部署我的应用程序,但我面临一个问题,如下所述。

     Warning (512):SplFileInfo::openFile(/var/www/html/tmp/cache/models/myapp_cake_model_default_email_queue): 
                   failed to open stream: Permission denied 
                   [CORE/src/Cache/Engine/FileEngine.php, line 391]

     Warning (512):SplFileInfo::openFile(/var/www/html/tmp/cache/models/myapp_cake_model_default_email_queue) 
                   [splfileinfo.openfile]: failed to open stream: Permission denied [CORE/src/Cache/Engine/FileEngine.php, line 391]

     Warning (512):cake_model cache was unable to write 'default_email_queue' to Cake\Cache\Engine\FileEngine cache 
                   [CORE/src/Cache/Cache.php, line 223].

我提到了几个链接并尝试了所有这些但仍然徒劳无功。

CakePHP 2.x warning SplFileInfo due to cakeshell

SplFileInfo::openFile(/app/tmp/cache/persistent/cake_core_cake_console_):failed to open stream:Permission denied in /lib/.../FileEngine.php line 293

任何帮助都将不胜感激。

1 个答案:

答案 0 :(得分:0)

尝试: <include> <X-PRE-PROCESS cmd="&#x73;&#x65;&#x74;" data="&#x64;&#x6f;&#x6d;&#x61;&#x69;&#x6e;&#x3d;&#x74;&#x65;&#x73;&#x74;&#x2e;&#x64;&#x6f;&#x6d;&#x61;&#x69;&#x6e;"/> <X-PRE-PROCESS cmd="&#x73;&#x65;&#x74;" data="&#x62;&#x6f;&#x6e;&#x67;&#x2d;&#x72;&#x69;&#x6e;&#x67;&#x3d;&#x76;&#x3d;&#x2d;&#x37;&#x3b;&#x25;&#x28;&#x31;&#x30;&#x30;&#x2c;&#x30;&#x2c;&#x39;&#x34;&#x31;&#x2e;&#x30;&#x2c;&#x31;&#x34;&#x37;&#x37;&#x2e;&#x30;&#x29;&#x3b;&#x76;&#x3d;&#x2d;&#x37;&#x3b;&#x3e;&#x3d;&#x32;&#x3b;&#x2b;&#x3d;&#x2e;&#x31;&#x3b;&#x25;&#x28;&#x31;&#x34;&#x30;&#x30;&#x2c;&#x30;&#x2c;&#x33;&#x35;&#x30;&#x2c;&#x34;&#x34;&#x30;&#x29;"/> </include>

如果你使用ubuntu: chmod 755 -R /var/www/html/tmp

注意:

您的帐户必须具有sudo chmod 755 -R /var/www/html/tmp权限