0

I use nginx 1.4.4 and I created a chrooted user. This user can only see his /home/user folder, and I created in a "www" folder.

I put in my virtual host file :

root /home/user/www; 

But I have an error :

*1 stat() "/home/crm/www/" failed (13: Permission denied) 

I try to put chmod 777 on home, home/user, home/user/www, but I got the error.

I took a look on this question : nginx + PHP-FPM = "permission denied" error 13 in nginx log; configuration mistake?, but I can't change owner the www folder.

How can I correct this ? Thanks.

2 Answers 2

0

Add your user to www-data group (Nginx should run as www-data).

1
  • Or chown www to user:www-data. (with r option). Commented Feb 7, 2014 at 13:34
0

Ok a lot of chmod after... I achieve what I wanted ! I got an other error on :

My config (namei -om /home/crm/www) :

drwxr-xr-x root root / drwxr-xr-x root root home drwxr-xr-x root root crm drwxrwxrwx crm sftp www 

And I have another error too on :

fastcgi_param SCRIPT_FILENAME $request_filename; 

The filename was bad an make an "file not found error" too.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.