Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 366761

Summary: net-ftp/pure-ftpd / openrc - fails to start with UPLOADSCRIPT specified
Product: Gentoo Linux Reporter: Kilburn Abrahams <kilburna>
Component: New packagesAssignee: Lars Wendler (Polynomial-C) (RETIRED) <polynomial-c>
Status: RESOLVED FIXED    
Severity: normal CC: net-ftp
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Kilburn Abrahams 2011-05-10 14:00:44 UTC
Update system to OpenRC/Baselayout 2. Using the following in /etc/conf.d/pure-ftpd 

UPLOADSCRIPT="/etc/pureftpd_clamav"
MISC_OTHER="-A -x -B -E -o -O clf:/var/log/pureftpd.log -lpuredb:/etc/pureftpd.pdb

Works fine before system update, but after the update pure-ftpd fails to start.

Error message:

start-stop-daemon: did not create a valid pid in `/var/run/pure-ftpd.pid'
 * Could not launch Pure-FTPd                                                                    [ !! ]
 * ERROR: pure-ftpd failed to start

Comment out UPLOADSCRIPT="/etc/pureftpd_clamav" and MISC_OTHER="-A -x -B -E -O clf:/var/log/pureftpd.log -lpuredb:/etc/pureftpd.pdb, and service starts.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2011-05-12 22:32:15 UTC
Maybe it's also a good idea to wrap those three very long lines in the .rc10 script, while you're there. :)
Comment 2 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2011-05-16 10:01:08 UTC
Can you please attach your uploadscript (without any confidental data of course)?
Comment 3 Kilburn Abrahams 2011-05-16 10:11:16 UTC
Here is the script:

#! /bin/sh
/usr/bin/clamdscan --remove --quiet --no-summary "$1"
Comment 4 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2011-05-16 14:55:44 UTC
+*pure-ftpd-1.0.32-r1 (16 May 2011)
+
+  16 May 2011; Lars Wendler <polynomial-c@gentoo.org>
+  -pure-ftpd-1.0.30-r1.ebuild, -pure-ftpd-1.0.31.ebuild,
+  +pure-ftpd-1.0.32-r1.ebuild, +files/pure-ftpd.conf_d-3,
+  +files/pure-ftpd.rc11:
+  Fixed startup of pure-ftpd with openrc when pure-uploadscript should be
+  started as well. Thanks to Kilburn Abrahams for reporting this in bug
+  #366761. Improved readability of the init script a bit (requested by jer).
+  Removed old (vulnerable) versions.
+

Seems like pure-ftpd doesn't create a pidfile when being invoked with the --uploadscript parameter. As we cannot rely on the ftp daemon creating the pidfile for us, start-stop-daemon from openrc is doing that job for us now. 
Please test pure-ftpd-1.0.32-r1 and report back if it works now.
Comment 5 Kilburn Abrahams 2011-05-16 16:45:55 UTC
works fine now. Thanks