I put the Coordino in directory /var/www/namal-geeks.com
and tried to check it on localhost/namal-geeks.com/
it gives the error
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
I looked in namal-geeks/index.php
which call the app/webroot/index.php
and thats what I found there
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';
Thought it would be problem of permissions so i tried giving the namal-geeks.com
directorysudo chmod 777 /var/www/namal-geeks.com
but still it gives the same error.
Here is the ouput of the ls -l
of the directory 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
and here is the output of ls -l
of the folderwww/namal-geeks.com/app/webroot/
where the other file index.php
exist and gives error about the permission
drwxrwxr-x 3 waqas waqas 4096 Nov 11 17:00 css
-rwxrwxr-x 1 waqas waqas 2984 Apr 19 2013 css.php
-rwxrwxr-x 1 waqas waqas 372 Apr 19 2013 favicon.ico
drwxrwxr-x 2 waqas waqas 4096 Nov 11 17:00 files
drwxrwxr-x 6 waqas waqas 4096 Nov 11 17:00 img
-rwxrwxrwx 1 waqas waqas 2641 Apr 19 2013 index.php //This file causing permissions problems
drwxrwxr-x 5 waqas waqas 4096 Nov 11 17:00 js
-rwxrwxr-x 1 waqas waqas 5256 Apr 19 2013 test.php
I am not sure how to solve this.
Help !
Is waqas the user defined in your apache.conf?
if not, you can simply
$chown -R www-data:www-data /var/www/namal-geeks/