Subject: Re: Hanging ftps

From: [email-masked] (Harald Milz)
Date: Thu, 27 Jul 1995 08:41:06 +0200 (MET DST)

Subject: Re: Hanging ftps
To: [email-masked]
Organization: Harry's Box

Mitch Wright ([email-masked]) wrote:
> I've noticed that we've had an increased number of ftp connections that
> linger around forever, eventually becoming <defunct>, still taking up a
> slot in the ftpusers list.  My gut feeling based on the output from ftpwho
> is that some web browsers and other ftp clients are using PASV and are
> not connecting like they should.

This happens on my server all the time. I have to check daily and kill 
hanging processes. This is on AIX 3.2.5 and AIX 4.1.2. Setting the timeout
explicitly on the command line didn't help.

---

From: Shane Castle <[email-masked]>
Date: Fri, 28 Jul 1995 14:43:14 -0600 (MDT)

>explicitly on the command line didn't help. 

I think I've found out why this is happening.  There is a buglet in fht
ftpd.c code that explains this.  One is that of you specify the timeout
on the ftpd command line in your inetd.conf, there must be no space
between the '-t' and the timeout period, e.g., '-t1800' will work but
'-t 1800' will not.  The second component of this problem might be (I
say "might", don't flame me if you know better!) that the 'timeout' and
'maxtimeout' variables are not declared as 'extern' in ftpd.c.  On my
system (AIX 3.2.5.1), adding 'extern' to these declarations in ftpd.c
and removing the whitespace on the inetd.conf line fixed the problem.
It may be that all I had to do was remove the whitespace.

Shane Castle             | "Perfection, then, is finally achieved, not
Boulder County Info Svcs | when there is nothing left to add, but when
Boulder CO USA           | there is nothing left to take away."
                         |                - Antoine de Saint-Exupery

---

From: Michael Brennen <[email-masked]>
Date: Fri, 28 Jul 1995 15:57:55 -0500 (CDT)

> It may be that all I had to do was remove the whitespace.

There is a bug in the original code that an accept() call had no guard
timer around it.  This and many other bugs fixes have been pulled together
into a new beta release.  You can get it at

ftp://ftp.academ.com/pub/wu-ftpd/private/wu-ftpd-2.4.2-beta-5.tar.gz

I think the file name is correct.  The private directory is write only, 
so I had to reconstruct the tar file name.

Many thanks to Stan for pulling this together and giving it a home.

Michael Brennen