php - Nginx PHP5.6 permission eror -
i getting following error in nginx error.log file, need prevent happening?
2016/06/28 09:43:37 [crit] 1631#0: *1 connect() unix:/run/php/php5.6 fpm.sock failed (13: permission denied) while connecting upstream, client: 192.168.56.1, server: my-vm, request: "get / http/1.1", upstream: "fastcgi://unix:/run/php/php5.6-fpm.sock:", $host: "my-vm-1"
nginx runs www-data permissions. permissions of folder error message referencing (/run/php/php5.6-fpm.sock
) follows:
drwxr-xr-x 20 root root 700 jun 28 09:45 run drwxr-xr-x 2 www-data www-data 80 jun 28 09:44 php srw-rw---- 1 www-data www-data 0 jun 28 09:44 php5.6-fpm.sock
the user/group of php (/etc/php/5.6/fpm/pool.d/www.conf
) is:
user = www-data group = www-data listen.owner = www-data listen.group = www-data listen.mode = 0660
the nginx.conf
file not have user
value set. people have suggested setting www-data
, if set nginx service won't start, hence why ommitted.
i fixed adding following user directive top of nginx.conf file:
user www-data www-data;
Comments
Post a Comment