首页 > 代码库 > socket() failed (13: Permission denied) while connecting to upstream
socket() failed (13: Permission denied) while connecting to upstream
/*************************************************************************** * socket() failed (13: Permission denied) while connecting to upstream * 说明: * 这个错误隐藏的挺深的,观察了许久,才从ps aux中的执行用户中找出来。 * * 2016-9-26 深圳 南山平山村 曾剑锋 **************************************************************************/一、错误现象: 2000/01/01 00:45:23 [alert] 1458#0: *1 socket() failed (13: Permission denied) while connecting to upstream, client: 192.168.1.144, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.1.203"二、原因: 1. # ps aux ...... 1407 root /sbin/klogd -n 1460 root udhcpc -R -n -p /var/run/udhcpc.eth0.pid -i eth0 1466 root nginx: master process /usr/sbin/nginx 1468 www-data nginx: worker process 1474 root /usr/sbin/sshd 1481 root /usr/sbin/telnetd -F 1485 root php-cgi -b 127.0.0.1:9000 -c /etc/php.ini 1494 root {mysqld_safe} /bin/sh /usr/bin/mysqld_safe --pid-file=/run/mysql 1631 root /usr/libexec/mysqld --basedir=/usr --datadir=/var/mysql --user=r 1634 root -sh 1638 root ps 2. 如上所示,1468进程执行用户是www-data无法访问到1485进程的php-cgi,因为这个root权限。三、解决办法: cat /etc/nginx/nginx.conf user root; ......
socket() failed (13: Permission denied) while connecting to upstream
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。