Bug 206843 - vsftpd is checked wrongly in init script
Summary: vsftpd is checked wrongly in init script
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: vsftpd   
(Show other bugs)
Version: 4.4
Hardware: All Linux
Target Milestone: ---
: ---
Assignee: Martin Nagy
QA Contact:
Keywords: Patch
Depends On:
TreeView+ depends on / blocked
Reported: 2006-09-17 07:21 UTC by Milan Kerslager
Modified: 2018-10-19 22:56 UTC (History)
6 users (show)

Fixed In Version: RHSA-2008-0680
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-07-24 19:34:47 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch of Init script (758 bytes, patch)
2007-08-21 10:36 UTC, Maros Barabas
no flags Details | Diff
Patch to disable the background option and behave like it was set to YES (1.06 KB, patch)
2008-02-04 14:01 UTC, Martin Nagy
no flags Details | Diff
Patch to add option --force-background (3.75 KB, patch)
2008-02-07 22:48 UTC, Martin Nagy
no flags Details | Diff
Patch for the initscript (943 bytes, text/x-patch)
2008-02-07 22:51 UTC, Martin Nagy
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2008:0680 normal SHIPPED_LIVE Moderate: vsftpd security and bug fix update 2008-07-24 16:38:54 UTC

Description Milan Kerslager 2006-09-17 07:21:58 UTC
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.

Comment 1 Maros Barabas 2007-02-06 14:32:16 UTC
Hi Milan,
     waiting at least one second to check if server is still running is very
ugly solution. 

I think

- /usr/sbin/vsftpd $i &
+ daemon /usr/sbin/vsftpd $i

 could be much better solution

Comment 2 Milan Kerslager 2007-02-06 14:59:52 UTC
If this could provide desired solution, use it please.

Comment 8 hajma 2007-03-17 00:11:26 UTC
(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 :-(

Comment 9 RHEL Product and Program Management 2007-05-09 09:36:56 UTC
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

Comment 10 Maros Barabas 2007-08-21 10:36:00 UTC
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

Comment 13 Issue Tracker 2007-08-24 10:27:48 UTC
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?

Thanks, Leonardo.

This event sent from IssueTracker by lmacchia 
 issue 114096

Comment 14 Maros Barabas 2007-08-25 21:24:48 UTC
This patch (including default "background=YES" behaviour) should be in next
update for RHEL4. Thanks.

Comment 19 Martin Nagy 2008-02-04 14:01:25 UTC
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

Comment 20 Martin Nagy 2008-02-07 22:48:26 UTC
Created attachment 294282 [details]
Patch to add option --force-background

This patch adds the option --force-background that when used will enforce

Comment 21 Martin Nagy 2008-02-07 22:51:44 UTC
Created attachment 294283 [details]
Patch for the initscript

This will fix the problem using the --force-background option from the previous

Comment 22 Martin Nagy 2008-02-08 10:50:39 UTC
Fix checked in CVS and the new packages were built successfully. This issue
should be resolved in vsftpd-2.0.1-6.el4

Comment 26 errata-xmlrpc 2008-07-24 19:34:47 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.