基于CakePHP的应用程序安装错误:777权限目录不可写?

时间:2014-09-15 11:43:21

标签: permissions cakephp-2.0 cakephp-2.4 selinux

尝试在服务器上安装基于CakePHP的应用程序,但出现以下错误:

Warning: _cake_core_ cache was unable to write 'cake_dev_en-us' to File cache in /var/www/html/cakephp-2460/lib/Cake/Cache/Cache.php on line 325

Warning: /var/www/html/tmp/cache/persistent/ is not writable 

听起来很简单,但事实并非如此 - 因为我的'持久'目录是可写的 - 事实上,/ tmp和它的子目录是可写的。

你可以指出我的问题在哪里?我是否缺少服务器上的某些PHP模块,或类似的东西?

与SeLinux有关吗?

2 个答案:

答案 0 :(得分:0)

检查该目录的用户组是否正确。

也许用户所有者组没有root权限,因此无法写入。

您可能需要在服务器上执行以下操作:

chown root:root -R / path_to_cake / app / tmp

答案 1 :(得分:0)

是的,这是你的SeLinux中的问题。你必须设置www / .. path ../ tmp目录是httpd_cache_t所以opan你的终端和

  1. 列表以查看系统中的所有httpt_cache_t

       # semanage fcontext -l | grep httpd 
    
  2. 设置www /.../ tmp目录

       # semanage fcontext -a -t 'httpd_cache_t' 'www/..path../tmp(/.*)?'
       # restorecon -Rvvv /path/to/wwwroot/cache
    
相关问题