Alex,

Interesting bug.  I thought that this would be an easy catch, but it is 
more subtle than I thought.  I can't recreate it here.

Your client sends a PASV command before attempting to put the file, 
which is the correct behavior.  Under normal circumstances that just 
tells the server to start listening on port for an incoming connection 
from your client.  If a PORT command or another PASV command is issued 
that listening socket gets tossed away.

In this case it is behaving like your client actually started connecting 
on that socket, or even connected.  So there is an open data connection 
but no data flowing.  And the next command (the dir or ls) requires a 
data connection, but it can't just blast the existing one.  Hence the 
error message.

I'm not sure what's going on, but I suspect that after about 10 seconds 
it would go away if it was just a connection that was starting.  At 
worst case that session is hosed up until that user logs out.

I'm going to keep looking at it, but it's not obvious.  It's also 
probably been in the code since day one - you just got lucky enough to 
hit it.


Mike


On 9/29/2011 9:20 AM, Single Stage to Orbit wrote:
> On Thu, 2011-09-29 at 08:37 -0500, Michael B. Brutman wrote:
>> I have made a large round of improvements to the FTP server in mTCP and
>> I am looking for a little testing help with it.  If you have a few spare
>> moments over the next day or two just try to connect to it and browse
>> the file structure.  Using a few different clients will help me shake
>> out any new bugs.  Upload some relevant files if you are adventurous.
> Uploads to incoming doesn't quite work for me. Here's the transcript of
> my session:
>
> $ ftp -n -p 96.42.66.188 2021
> Connected to 96.42.66.188 (96.42.66.188).
> 220 mTCP FTP Server
> ftp>  user anonymous
> 331 Anonymous ok, send your email addr as the password
> Password:
> 230-Welcome to Mike's PCjr running the mTCP FTP server!  This machine
> 230-was released by IBM in 1983 and features a 4.77Mhz Nec V20 CPU (an
> 230-upgrade from the standard 8088), an XT-IDE modified for the PCjr, a
> 230-Western Digital 8003 Ethernet card, and a 20GB Maxtor hard drive.
> 230-It is running DOS 3.3 so most of the hard drive is not being used.
> 230-Please poke around, test things out, report any problems you might
> 230-have, and enjoy!  Incoming files may be deposited at /incoming, and
> 230-you can create subdirectories there if needed.    -Mike
> 230 User logged in
> ftp>  put alex_was_here
> local: alex_was_here remote: alex_was_here
> 227 Entering Passive Mode (96,42,66,188,11,76)
> 550 You need to be in the /INCOMING directory to upload
> ftp>  cd incoming
> 250 CWD command successful
> ftp>  put alex_was_here
> local: alex_was_here remote: alex_was_here
> 227 Entering Passive Mode (96,42,66,188,8,221)
> 550 Bad path
> ftp>  dir
> 425 Transfer already in progress
> Passive mode refused.
> ftp>  ls
> 425 Transfer already in progress
> Passive mode refused.
> ftp>  bye
> 221 Server closing connection
>
> Hope this helps



------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to