command line ftp session hangs with dir

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am running XP Pro installed with recent updates no (SP2) on Dell Latitude
D800 w/broadcom NIC.

I open a cmdline (CMD) and connect to a local site via "ftp 10.227.1.50".
Connection is successful the ftp server and log in with no problems, however
when I do a "dir" command the session hangs.

ftp> dir
200 PORT command successful

....that's where it hangs.

Anyone have any ideas why XP cmdline hangs?

Thanks.

Tony
 
Tony Saucedo said:
I am running XP Pro installed with recent updates no (SP2) on Dell
Latitude
D800 w/broadcom NIC.

I open a cmdline (CMD) and connect to a local site via "ftp 10.227.1.50".
Connection is successful the ftp server and log in with no problems,
however
when I do a "dir" command the session hangs.

ftp> dir
200 PORT command successful

...that's where it hangs.

Anyone have any ideas why XP cmdline hangs?

Thanks.

Tony


This is usually a firewall issue on your PC.

OK, take a deep breath...
FTP is a bit complicated :-)
It uses 2 connections, control and data.

FTP can use 2 'modes', Active and Passive.
In 'Active' mode, your PC makes the initial (control )connection,
but for data transfer, the server 'calls back' on a second (data )
connection.

A firewall on the client will block this as un-solicited.

This is exactly what you are seeing.
You are seeing the controll connection working,
but no data connection being established.

It may be possible to configure your firewall to permit Active FTP, but
since the port number used by the second data connection is dynamically
negotiated by FTP ( in the PORT commend ), it is difficult to configure a
simple rule on the firewall to permit it.

The usual workaround for this is to employ Passive mode FTP.
This causes the second (data) connection to originate from your PC.
The firewall will permit return data traffic since the connection originated
from you.

All real FTP clients have the option to set passive FTP mode,
even Internet Explorer ( Internet options, Advanced tab. )

The command-line version of FTP in XP does not support passive mode, and
that makes it very poor indeed. So I use this alternative command-line FTP
program, which is much more full-featured. Do a ? at the ftp> prompt, and
you will see the options. The command you need to issue is PASV.

ftp://ftp.gnu.org/old-gnu/emacs/windows/contrib/ftp-for-win32.zip
 
Ron Lowe said:
This is usually a firewall issue on your PC.

OK, take a deep breath...
FTP is a bit complicated :-)
It uses 2 connections, control and data.

FTP can use 2 'modes', Active and Passive.
In 'Active' mode, your PC makes the initial (control )connection,
but for data transfer, the server 'calls back' on a second (data )
connection.

A firewall on the client will block this as un-solicited.

This is exactly what you are seeing.
You are seeing the controll connection working,
but no data connection being established.

It may be possible to configure your firewall to permit Active FTP, but
since the port number used by the second data connection is dynamically
negotiated by FTP ( in the PORT commend ), it is difficult to configure a
simple rule on the firewall to permit it.

The usual workaround for this is to employ Passive mode FTP.
This causes the second (data) connection to originate from your PC.
The firewall will permit return data traffic since the connection originated
from you.

All real FTP clients have the option to set passive FTP mode,
even Internet Explorer ( Internet options, Advanced tab. )

The command-line version of FTP in XP does not support passive mode, and
that makes it very poor indeed. So I use this alternative command-line FTP
program, which is much more full-featured. Do a ? at the ftp> prompt, and
you will see the options. The command you need to issue is PASV.

ftp://ftp.gnu.org/old-gnu/emacs/windows/contrib/ftp-for-win32.zip
I guess in this case it's the ftp version on my system, since I do not have
a firewall
on this pc, nor is there one between the pc and the server. Why did MS
change it, I recalled it worked fine when I had W2K.

You know another weird thing is, I have a Chinese OS installed on another pc
and ftp from the command line works fine no problems. I checked the date and
it is has more recent date(8/16/2004) then mine 8/29/2002. However it still
did not work after I tried it on my system (XP-en). Just thought I mention
it.

By the way thank you very much for the link the is a real ftp version, it
worked great!
Thanks again!
Tony
 
Back
Top