IIS 5 & IIS 6
problem with FTP using command prompt
Last post Jul 15, 2009 08:49 PM by robmcm
Jul 06, 2009 04:49 PM|chrisduff|LINK
I have a very strange issue, I am trying to FTP to a remote server ( Win2003 server) using command prompt. I can connect to the machine, it accepts my credentials, now if I do a ls command, command line just hangs and nothing happens. If I fo a "put" it
it seems to hang as well. If after that I check the directory on the server where I did the "put" I can see that the file is created but it has 0 bytes.
I have this problem ONLY whithin our office network, and the problem only occures with command prompt. If I use a third party tool like filezilla it works fine, I can also FTP using IE
Also the command prompt method, works fine when used Outside our network.
We checked our Antivirus, network firewall log and nothing is being stopped - we even created a rule for a particular machine so everything was opened to it and still not joy
The Firewall on our server didn't deny anything either.
Any advice are welcome as we have a number of application which runs scripts using DOS to ftp files to our site.
Jul 06, 2009 05:17 PM|kehand|LINK
It's likely that you need passive mode enabled to connect to your FTP Server. Filezilla makes the switch automatically for the user. To do this in the
ftp.exe client on Windows, try (without the double quotes):
That should switch you into passive mode. Please let us know if this does not resolve the situation.
Jul 06, 2009 06:06 PM|ServerIntellect_BH|LINK
That sounds about right.
Command Prompt uses Active mode by default.
As you are able to log in (port 21), but not issue commands, it would seem you are not able to establish the Data connection which, using active mode would mean you would have to have a random port open on your firewall to connect to the server's data port
As FileZilla uses PASSIVE mode by default, it is able to connect to the server on a random port, instead of forcing the port to be open on your firewall, to establish the data connection.
Jul 07, 2009 03:10 PM|chrisduff|LINK
Thank for replying,
I tried with "quote pasv" but it didn't work. Also I can use command prompt to FTP to my server with any machine outside my network. It only fails whithin the network.
When i say fails, in fact it connects, create the file on the remote server but doesn't transfer the data. I end up with a 0 byte file.
Jul 15, 2009 08:49 PM|robmcm|LINK
While "quote pasv" will actually send the PASV command over the wire, the ftp.exe command-line program is not actually capable of passive communications, so I would expect it to continue to fail.
For command-line operations I would suggest switching to the MOVEit Freely command-line secure FTP client that I discussed in this blog, which can do both passive and FTPS communication: