I'm trying to setup nginx and cgit on FreeBSD but nginx can't access /var/run/fcgiwrap/fcgiwrap.sock.
In my /etc/rc.conf I already set fcgiwrap_user="www", and www is also the user nginx runs as.
When I make fcgiwrap.sock owned by www by performing chown www /var/run/fcgiwrap/fcgiwrap.sock, everything works the way I want.
However this is of course not the proper way to do this, and it will only last until reboot.
I was under the assumption that setting fcgiwrap_user="www" would also determine this.
Am I missing something?
Update:
I noticed that when I use service fcgiwrap start or restart, the message Starting fcgiwrap is followed by chmod: /var/run/fcgiwrap/fcgiwrap.sock: No such file or directory. However /var/run/fcgiwrap/fcgiwrap.sock does exist afterwards.