Forum: NGINX SimpleCGI - cgi.sock comes with wrong permission

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Dieter Zinke (Guest)
on 2009-03-07 16:30
(Received via mailing list)
I have setup nginx (compiled from source) for using perl via this
scenario http://wiki.codemongers.com/NginxSimpleCGI. I ve red other
things from this list, but this scenario works for me more or less.

I start the CGI process with

dieta@zwei:/usr/local/bin$ sudo perl cgiwrap-fcgi.pl &
[1] 10207
bernd@zwei:/usr/local/bin$ FastCGI: manager (pid 10207): initialized
FastCGI: server (pid 10208): initialized
FastCGI: manager (pid 10207): server (pid 10208) started
FastCGI: server (pid 10209): initialized
FastCGI: manager (pid 10207): server (pid 10209) started
FastCGI: server (pid 10210): initialized
FastCGI: manager (pid 10207): server (pid 10210) started
FastCGI: server (pid 10211): initialized
FastCGI: manager (pid 10207): server (pid 10211) started
FastCGI: server (pid 10212): initialized
FastCGI: manager (pid 10207): server (pid 10212) started


this results in a

srwxr-xr-x 1 root staff      0  7. Mär 15:03 cgi.sock

this results in a

2009/03/07 15:05:57 [crit] 7507#0: *18 connect() to
unix:/usr/local/nginx/logs/cgi.sock failed (13: Permission denied) while
connecting to upstream, client: 127.0.1.1, server: example.com, request:
"GET /blog/getPath.pl HTTP/1.1", upstream:
"fastcgi://unix:/usr/local/nginx/logs/cgi.sock:", host: "example.com",
referrer: "http://example.com/"

doing a chmod 777 to cgi.sock

srwxrwxrwx 1 root staff      0  7. Mär 15:03 cgi.sock

makes it accessible for nginx, but doing this by hand is a bit odd to
me. How can i fix this or i am doing something wrong?
This topic is locked and can not be replied to.