Nginx connect () for unix: /var/run/fcgiwrap.socket failed

I am trying to install Gitweb on my Nginx server. Everything seems to be set up correctly, but I seem to be getting the following error in my gitweb.log file:

`2015/06/08 08:42:05 [crit] 29135#0: *5 connect() to unix:/var/run/fcgiwrap.socket failed (13: Permission denied) while connecting to upstream, client: 83.36.85.6, server: git.mydomain.co.uk, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/fcgiwrap.socket:", host: "git.mydomain.co.uk"`

      

I have checked the owner / permissions and everything seems to be fine.

srwxr-xr-x 1 www-data www-data 0 Jun 8 08:44 /var/run/fcgiwrap.socket

Conclusion ps aux | grep nginx

:

root     30283  0.0  0.0  90552  1296 ?        Ss   08:59   0:00 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
forge    30284  0.0  0.0  90884  1924 ?        S    08:59   0:00 nginx: worker process                           
forge    30285  0.0  0.1  90884  2408 ?        S    08:59   0:00 nginx: worker process                           
root     30528  0.0  0.0  11980   928 pts/0    R+   09:03   0:00 grep --color=auto nginx

      

What ideas might come up?

+3


source to share


1 answer


The socket must be readable and writeable by both the client and the server. Assuming the server is running as www-data

and the client is running as forge

a group forge

, the following steps should fix the problem.

Change the group membership of the socket to the user group forge

.

chgrp forge /var/run/fcgiwrap.socket

      



Change the group permission to allow write for the group forge

.

chmod g+w /var/run/fcgiwrap.socket

      

The socket will now be available for reading and writing by both the server and the client.

+7


source







All Articles