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.

Vincent LITUR
  • 385
  • 1
  • 5
  • 9

2 Answers2

0

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

Thomas Decaux
  • 1,239
  • 11
  • 13
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.

Vincent LITUR
  • 385
  • 1
  • 5
  • 9