Because /etc/init.d/vsftpd use "&" when launching daemon, RETVAL=$? does not
work and always returns success even daemon does not start (missing RSA key file).
Also error message is not sent to the log.
To reproduce, place "ssl_enable=YES" to /etc/vsftpd/vsftpd.conf and do not
generate vsftpd.pem in /usr/share/ssl/certs. Try run vsftpd by init script. Even
OK, daemon does not run. Run "vsftpd /etc/vsftpd/vsftpd.conf! to see error message:
500 OOPS: SSL: cannot load RSA key
There should be RETVAL=$! (most recently executed background command) and check
if the daemon is running after a while. Check /etc/init.d/opensmd from opensm
package how to check it.
waiting at least one second to check if server is still running is very
- /usr/sbin/vsftpd $i &
+ daemon /usr/sbin/vsftpd $i
could be much better solution
If this could provide desired solution, use it please.
(In reply to comment #1)
> - /usr/sbin/vsftpd $i &
> + daemon /usr/sbin/vsftpd $i
> could be much better solution
but this causes the init script to hang :-(
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release. Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products. This request is not yet committed for inclusion in an Update
Created attachment 161959 [details]
Patch of Init script
Please try this patch .. tested on RHEL-4.5 with vsftpd-2.0.1-5.EL4.5
Thank you, it works (RHEL 4, vsftpd-2.0.1-5.EL4.5) if:
- I set "background=YES" in "/etc/vsftpd/vsftpd.conf" (the default in
RHEL 4 is "NO")
- I apply to "/etc/rc.d/init.d/vsftpd" the patch as per comment #10
Should we then consider those changes for future RHEL 4s?
This event sent from IssueTracker by lmacchia
This patch (including default "background=YES" behaviour) should be in next
update for RHEL4. Thanks.
Created attachment 293886 [details]
Patch to disable the background option and behave like it was set to YES
In my opinion, we shouldn't push in a patch that could cause that vsftpd won't
start if a specific configuration is used (background=NO). I propose to use
this patch along with Maros' so that the background option is silently ignored
and the behavior is same as if the background option was set to YES. Any
Created attachment 294282 [details]
Patch to add option --force-background
This patch adds the option --force-background that when used will enforce
Created attachment 294283 [details]
Patch for the initscript
This will fix the problem using the --force-background option from the previous
Fix checked in CVS and the new packages were built successfully. This issue
should be resolved in vsftpd-2.0.1-6.el4
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.