Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fcgiwrap doesn't start as service on FreeBSD 13 #59

Open
deep-darky opened this issue Apr 27, 2022 · 3 comments
Open

fcgiwrap doesn't start as service on FreeBSD 13 #59

deep-darky opened this issue Apr 27, 2022 · 3 comments

Comments

@deep-darky
Copy link

deep-darky commented Apr 27, 2022

Hi!
When I install fcgiwrap on FreeBSD 13.0 + nginx, I can't start service with:

root@myhost:/var/run/fcgiwrap# service fcgiwrap start
Starting fcgiwrap.
root@myhost:/var/run/fcgiwrap# service fcgiwrap status
fcgiwrap is not running.
root@myhost:/var/run/fcgiwrap#

There are no errors, but also no pid file and sock.
when I manually execute this script (writting for debug):

root@myhost:~/bin# start_fcgi.sh
#!/bin/sh
/usr/sbin/daemon -S -p /var/run/fcgiwrap/fcgiwrap.pid /usr/local/sbin/fcgiwrap -c 2 -s unix:/var/run/fcgiwrap/fcgiwrap.sock
chown www:www /var/run/fcgiwrap/fcgiwrap.sock

Everything fine - I see:

root@myhost:/var/run/fcgiwrap# ls -l
total 5
-rw------- 1 root wheel 4 Apr 27 15:06 fcgiwrap.pid
srwxr-xr-x 1 www www 0 Apr 27 15:06 fcgiwrap.sock

Something wrong is in /usr/local/etc/rc.d/fcgiwrap
( I attach it, as is).
fcgiwrap.zip
For avoid any mistake, I twice install fcgiwrap - with pkg and with building from ports, but nothing change
This issue I have only on FreeBSD 13.0. I have another installation fcgiwrap on Archliux - it works fine "Just form box :-)"

With Best Wishes!!!

@tuffnatty
Copy link

works fine here with fcgiwrap_socket_group="www" in rc.conf

@0x1eef
Copy link

0x1eef commented Feb 17, 2024

I see the same problem as the original poster. 14-STABLE.

root@freebsd:~ # service fcgiwrap start
Starting fcgiwrap.
root@freebsd:~ # service fcgiwrap status
fcgiwrap is not running.

It can also fail in this way:

root@freebsd:~ # service fcgiwrap start                                                                                                                                   
===> fcgiwrap profile: git                                                                                                                                                
Starting fcgiwrap.                                                                                                                                                        
chmod: /var/run/fcgiwrap.git.sock: No such file or directory                         
chgrp: /var/run/fcgiwrap.git.sock: No such file or directory

In both cases an fcgiwrap process never starts.

rc.conf

fcgiwrap_enable=YES
fcgiwrap_user=www   
fcgiwrap_group=www
fcgiwrap_socket_owner=www
fcgiwrap_socket_group=www
# triggers first error
fcgiwrap_socket="/var/run/fcgiwrap/fcgiwrap.sock"
# triggers second error
fcgiwrap_socket="unix:/var/run/fcgiwrap/fcgiwrap.sock"

@0x1eef
Copy link

0x1eef commented Feb 17, 2024

I think I might have found the problem. /usr/local/sbin has no read or write permissions for users who fall into other, and I want to run fcgiwrap as www - a user who can't execute binaries from that directory. For example:
daemon -S -u www /usr/local/sbin/fcgiwrap -s .... If I move fcgiwrap to /usr/local/bin, and update the rc.d script to use that path instead.... problem goes away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants