ftp client bug?

Mike Dopheide dopheide at ncsa.uiuc.edu
Tue Oct 21 16:17:18 EDT 2003


We seem to have found a obscure bug in the ftp client that only appears 
when switching between passive/active mode with the right combination of 
Retr/Stor.  So far this has only been tested with version 1.2.7.

After retrieving a file in passive mode, the first attempt at storing the 
file in active mode results in the remote file having zero size.  

I've included an example session below which I've broken up for clarity.

ftp> put one
local: one remote: one
200 PORT command successful.
150 Opening BINARY mode data connection for one.
226 Transfer complete.
12 bytes sent in 9.5e-05 seconds (1.2e+02 Kbytes/s)

ftp> passive
Passive mode on.

ftp> get one
local: one remote: one
227 Entering Passive Mode (141,142,2,56,144,24)
150 Opening BINARY mode data connection for one (12 bytes).
226 Transfer complete.
12 bytes received in 4.7e-05 seconds (2.5e+02 Kbytes/s)

ftp> passive
Passive mode off.

ftp> put one
local: one remote: one
200 PORT command successful.
150 Opening BINARY mode data connection for one.
local: one: Bad file descriptor
226 Transfer complete.

At this point, the remote copy of 'one' has zero size.  Note, however, 
that if we repeat the same command again, it works:

ftp> put one
local: one remote: one
200 PORT command successful.
150 Opening BINARY mode data connection for one.
226 Transfer complete.
12 bytes sent in 7.3e-05 seconds (1.6e+02 Kbytes/s)


This has been testing with multiple client/server combinations with the 
same result.

-Mike





More information about the krbdev mailing list