Nginx – Permission problems, nginx can’t access the site

nginxpermissionsphp-fpm

So, I'm having some problems with my permissions.

I have a directory named /sites/ and within that directory i have a couple of more directories of all my vhosts. One of them for example is /sites/rb.

/sites/rb/application/..
/sites/rb/public_html/index.php

I'm editing the files over sFTP, with my user "jimp", jimp is part of the group www-pub.

chown –R root:www-pub /sites/rb

If i simply type "touch abc" i get this:
-rw-r–r– 1 jimp www-pub 0 30 jun 23.55 abc

and if i create a file with my sftp client i get:
-rw-r–r– 1 jimp www-pub 0 30 jun 23.55 abc_sftp

The problem is that nginx can't access my site.
Nginx error log:
2010/06/30 23:45:36 [crit] 5459#0: *3 stat() "/sites/rb/public_html/index" failed (13: Permission denied), client: 11.11.11.111, server: rb.rb.com, request: "GET /index HTTP/1.1", host: "rb.rb.com"

I'm using php5-fpm.

I'm sorry for my poor english. I would appreciate any help very much because this is not my area! 🙂

Best Answer

is

/sites/rb/public_html/

at least chmod 711?

Actually, in looking at that a little closer, it looks like it is trying to access /sites/rb/public_html/ on your filesystem rather than the correct path. It would seem that you may have

location / {
    root /sites/rb/public_html/;
}

rather than having the proper full path for root.

Related Topic