Coordino许可问题?

时间:2013-11-15 14:52:56

标签: php permissions

我将Coordino放在目录/var/www/namal-geeks.com中并尝试在localhost/namal-geeks.com/上检查它是否给出了错误

Warning: require(app/webroot/index.php): failed to open stream: Permission denied in    /var/www/namal-geeks/index.php on line 55

Fatal error: require(): Failed opening required 'app/webroot/index.php' (include_path='.:/usr/share/php:/usr/share/pear:/var/www/namal-geeks.com:/var/www/namal-geeks.com/app/') in /var/www/namal-geeks.com/index.php on line 55 

我查看namal-geeks/index.php,调用app/webroot/index.php,这就是我在那里找到的

L-No
 41   /**
 42    * Set the include path or define app and core path
 43    */
 44     if (function_exists('ini_set')) {
 45     ini_set('include_path',
 46         ini_get('include_path') . PATH_SEPARATOR . CAKE_CORE_INCLUDE_PATH
 47     . PATH_SEPARATOR . ROOT . DS . APP_DIR . DS
 48         );
 49     define('APP_PATH', null);
 50     define('CORE_PATH', null);
 51     } else {
 52     define('APP_PATH', ROOT . DS . APP_DIR . DS);
 53     define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS);
 54     }
 55     require APP_DIR . DS . WEBROOT_DIR . DS . 'index.php';

认为这是权限问题,所以我尝试给namal-geeks.com目录sudo chmod 777 /var/www/namal-geeks.com,但它仍然给出了同样的错误。

以下是目录ls -l

www/namal-geeks.com/的输出
total 36
drwx------ 12 waqas waqas 4096 Nov 15 18:59 app
drwx------  6 waqas waqas 4096 Nov 11 17:00 cake
-rwxrwxrwx  1 waqas waqas 1886 Nov 23 19:47 index.php //this file have all permissions 
-rw-r--r--  1 waqas waqas 1053 Apr 19  2013 LICENSE.txt
drwx------  2 waqas waqas 4096 Nov 11 17:00 plugins
-rw-r--r--  1 waqas waqas 4528 Apr 19  2013 Readme.md
-rw-r--r--  1 waqas waqas 3712 Apr 19  2013 README.txt
drwx------  5 waqas waqas 4096 Nov 11 17:00 vendors

以下是文件夹ls -l的{​​{1}}的输出,其中存在其他文件www/namal-geeks.com/app/webroot/并提供有关权限的错误

index.php


我不知道如何解决这个问题。
帮助!

1 个答案:

答案 0 :(得分:0)

你的apache.conf中定义了用户waqas吗?

如果没有,你可以简单地

  

$ chown -R www-data:www-data / var / www / namal-geeks /