Error when I access http://xyz.com/2/sitecake.php

when I access the URL

http://xyz.com/2/sitecake/2.3.6/config/check.php I get the bellow errors.

Root site directory have to be readable and writable. in /var/www/xyz.com/html/2/sitecake/2.3.6/config/check.php on line 24

when I access the site

http://xyz.com/2/sitecake.php the error I get is

The xyz.com page isn’t working

xyz.com is currently unable to handle this request.
HTTP ERROR 500


httpd -v results

jhos@vps85774:/var/log/nginx$ httpd -v
No command ‘httpd’ found, did you mean:
Command ‘xttpd’ from package ‘xtide’ (universe)
Command ‘https’ from package ‘httpie’ (universe)
Command ‘http’ from package ‘httpie’ (universe)
httpd: command not found

php -v results

jhos@vps85774:/var/log/nginx$ php -v
PHP 5.5.9-1ubuntu4.20 (cli) (built: Oct 3 2016 13:00:37)
Copyright © 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright © 1998-2014 Zend Technologies
with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v6.0.7, Copyright © 2002-2016, by ionCube Ltd.
with Zend OPcache v7.0.3, Copyright © 1999-2014, by Zend Technologies
jhos@vps85774:/var/log/nginx$

Log file:

2016/12/08 04:32:24 [error] 6898#0: *2558 FastCGI sent in stderr: “PHP message: PHP Fatal error: Root site directory have to be readable and writable. in /var/www/xyz.com/html/2/sitecake/2.3.6/config/check.php on line 24” while reading response header from upstream, client: 113.103.149.xxx, server: xyz.com, request: “GET /2/sitecake.php HTTP/1.1”, upstream: “fastcgi://unix:/var/run/php5-fpm.sock:”, host: “xyz.com

ok I guess the problem is with permissions

sudo chmod 777 directory works

ok the problem is with permissions.

Is the below correct?

chown -R user:group /var/www/xyz.com/html
chmod -R g+w /var/www/xyz.com/html

for the error to be rectified. Am I missing anything else here?

???

not sure about this. Problem is that PHP user don’t have permission to read or write to site root dir, and that’s requirement. Give the user that runs PHP permissions to that dir and it should work.

ok thanks this worked

sudo chown -R user:www-data /var/www/xyz.com/html/foldername