Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 375565 - net-ftp/pure-ftpd init script fails with UPLOADSCRIPT set
Summary: net-ftp/pure-ftpd init script fails with UPLOADSCRIPT set
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Lars Wendler (Polynomial-C)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-18 14:43 UTC by Daniel Heule
Modified: 2019-04-20 14:54 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
New Init Script (pure-ftpd-initscript,2.30 KB, text/plain)
2011-07-18 14:46 UTC, Daniel Heule
Details
Extended pure-ftpd conf.d file (pure-ftpd-conf.d,3.90 KB, text/plain)
2011-07-18 14:47 UTC, Daniel Heule
Details
Diff of init.d/pure-ftpd (init.d_pure-ftpd.diff,1.96 KB, patch)
2011-07-19 07:26 UTC, Daniel Heule
Details | Diff
Diff of conf.d/pure-ftpd (conf.d_pure-ftpd.diff,778 bytes, patch)
2011-07-19 07:27 UTC, Daniel Heule
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Heule 2011-07-18 14:43:36 UTC
Hello Gentoo Dev's.

We run in a problem with the actual pure-ftpd.

The Problem is the same as in Bug 366761, but i have
tracked the problem down.

pure-ftpd don't create the pidfile until pure-uploadscript is started,
so the order wich the initscript is starting the daemons is wrong.

I have wrote a updated init script with starts first if neaded the 
pure-uploadscript, the starting pure-ftpd, so no problem exist.

Please add the new init-script and extended conf.d file to the official ebuild,
so other users doesn't waste time to analyse why pure-ftpd don't startup after
configuring a upload script.


Thank you.

Reproducible: Always

Steps to Reproduce:
1. Configure /etc/conf.d/pure-ftpd with a UPLOADSCRIPT set.
2. Try to start /etc/init.d/pure-ftpd 
3. Startup Fails
Actual Results:  
Statup Fails

Expected Results:  
Startup of Pure run without a Problem.

I have also added support for the extauth method, which also
require an additional daemon wich must be startet bevor the
startup of pure-ftpd.
Comment 1 Daniel Heule 2011-07-18 14:46:54 UTC
Created attachment 280303 [details]
New Init Script
Comment 2 Daniel Heule 2011-07-18 14:47:44 UTC
Created attachment 280305 [details]
Extended pure-ftpd conf.d file

Added support for extauth from pure-ftpd
Comment 3 Lars Wendler (Polynomial-C) gentoo-dev 2011-07-18 14:54:31 UTC
Can you please attach unified diffs of the two files you did changes to?
Comment 4 Daniel Heule 2011-07-19 07:26:45 UTC
Created attachment 280341 [details, diff]
Diff of init.d/pure-ftpd
Comment 5 Daniel Heule 2011-07-19 07:27:15 UTC
Created attachment 280343 [details, diff]
Diff of conf.d/pure-ftpd
Comment 6 Daniel Heule 2011-07-19 07:48:54 UTC
I hope you can integrate this fixes, so other users
don't have to track down the same problems.

Thank you.
Comment 7 Lars Wendler (Polynomial-C) gentoo-dev 2011-07-20 01:38:52 UTC
I'm a bit confused. The diff of the init.d file seems not being made against the latest init.d script from portage but from an outdated version. More precisely against the old init script which suffered from bug #366761

Furthermore what's about this pure-ftpd-authhandler? Where in the pure-ftpd source-package can this script/binary be found? And why do you refer it to /usr/local/sbin/? That's no path any ebuild should ever install into.
Comment 8 Daniel Heule 2011-07-20 06:10:09 UTC
I have made the diff to the stable version from portage:

equery l -p pure-ftpd
 * Searching for pure-ftpd ...
[-P-] [ -] net-ftp/pure-ftpd-1.0.29-r1:0
[IP-] [  ] net-ftp/pure-ftpd-1.0.32:0
[-P-] [ ~] net-ftp/pure-ftpd-1.0.32-r2:0

If you wan't, i can make a diff against the unstable version.

But the Problem is still the same (i have read the init script from unstable version), pure-ftpd don't write the pid until the upload deamon is ready, 
so the startup order need to be first the upload deamon if needed, 
then the ftp daemon.

The feature with authhandler is a methond,
which give the user the power to write his own 
authentication programm/script (which can be a pussle in the auth chain),
so you can do other things with this programm, 
like feed brute-forcing ip's from botnets to a iptables filter 
like we do. I have only make the init script ready for that,
the script/programm must be self writen with the needs in mind,
so my config example points to /usr/local --> self writen program / scripts. 

See http://download.pureftpd.org/pub/pure-ftpd/doc/README.Authentication-Modules

for a example.
Comment 9 Maurice Volaski 2011-09-03 19:06:55 UTC
The conf.d and init script here result in 

* Caching service dependencies ...                                                                                                                                                                                                                                                          [ ok ]
 * Starting Pure-FTPd ...
 * start-stop-daemon: did not create a valid pid in `/var/run/pure-ftpd.pid'

This is even occurs with uploadscript stuff commented out.
Comment 10 Daniel Heule 2011-09-06 09:49:17 UTC
This 

Starting Pure-FTPd ...
 * start-stop-daemon: did not create a valid pid in `/var/run/pure-ftpd.pid'


indicates that you have configured extauth as auth method,
but not configured extauth daemon to start,
so pure-ftpd wil wait forever (until extauthd is started) bevor he is creating the pidfile

Please make sure that in conf.d
in the AUTH=.... line is no "extauth:" part or config the extauth daemon and start it (look at the EXTAUTH lines in conf.d).
Comment 11 Lars Wendler (Polynomial-C) gentoo-dev 2013-06-18 12:20:43 UTC
Any news here? Is this still an issue?
Comment 12 Daniel Heule 2013-08-19 09:13:55 UTC
Jep, problem is stil the same in the newest ebuild.

But nobody except me seems to use extauth method and/or upload script.

So please use the submited init script and conf files or close the bug
if you don't wan't to fix it ...
Comment 13 Lars Wendler (Polynomial-C) gentoo-dev 2013-09-05 19:35:43 UTC
Please provide a new diff file against the latest init script or else there's not much I can do here.
Comment 14 Daniel Heule 2013-09-12 08:50:20 UTC
In the mean time, i have reverted my setup back to 
not use the extauth method anymore, 
and i have reverted the init script to orginal.

Please close the bug, since i no more can verify the proper function of extauth daemon ...