Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

keithplu

Thanks for your response, Martyn

Turns out the problem was nothing to do with WinSCP.....

I discovered that the WinSCP 4.1.9 was using Active FTP, and didn't work with Passive.
The WSFTP Pro was also using Active FTP and did not work with Passive. I found this out by looking at the WS FTP Pro Log when making the connection. When you configure WS FTP Pro to use Passive, it will automatically try Active if it fails on Passive when making the connection, thus giving you a false sense of security.

The problem was actually the Port Range I had specified on the Windows IIS 6 Server to use for Passive FTP. There must have been a conflict or might have started too low, because when I changed the range to higher Port Numbers, I could use Passive FTP with the server.

Keith
martin

Re: Unable to Open a Data Connection to FTP Server

Are you sure the WSFTP uses passive mode? The 425 response comes from your server before WinSCP can even try the passive mode connection. Please attach a complete session log file from WinSCP (this timestamp) as well as from WSFTP. Log from "WinSCP Version 4.1.9 from a different Windows 2003 Server" would help too for comparison.
keithplu

Unable to Open a Data Connection to FTP Server

When attempting to connect to a site on a specific Windows 2003 FTP server, I am experiencing the following in some instances of Win SCP

Error Message:-

Could not retrieve directory listing
Can't open data connection.

Here is the Log (I have removed the header and other information relating to my local PC):-

Session name:
Host name:
User name:
Tunnel: No
Transfer Protocol: FTP
Ping type: C, Ping interval: 30 sec; Timeout: 15 sec
Proxy: none
Send buffer: 262144
FTP: FTPS: None; Passive: Yes [Force IP: +]; MLSD: - [List all: A]
Local directory: , Remote directory: /SSFTP, Update: Yes, Cache: Yes
Cache directory changes: Yes, Permanent: Yes
DST mode: 1; Timezone offset: 0h 0m
--------------------------------------------------------------------------
Connecting to
Connected with
220 Microsoft FTP Service
USER
331 Password required for
PASS *********
230 User logged in.
SYST
215 Windows_NT
FEAT
211-FEAT
SIZE
MDTM
211 END
Connected
--------------------------------------------------------------------------
Using FTP protocol.
Doing startup conversation with host.
PWD
257 "/" is current directory.
Changing directory to "/SSFTP".
CWD /SSFTP
250 CWD command successful.
Getting current directory name.
PWD
257 "/SSFTP" is current directory.
Retrieving directory listing...
TYPE A
200 Type set to A.
PASV
425 Can't open data connection.
Could not retrieve directory listing
LIST with -a failed, walling back to pure LIST
Retrieving directory listing...
TYPE A
200 Type set to A.
PASV
425 Can't open data connection.
Could not retrieve directory listing
(ECommand) Error listing directory '/SSFTP'.
Could not retrieve directory listing
Can't open data connection.
Startup conversation with host finished.
REST 0
350 Restarting at 0.


The problem occurs with WinSCP Versions 5.5.2 (Windows 8 PC and Windows XP PC) and 5.5.5 (Windows Server 2012 R2)
Both are attempting Passive FTP, Commander Interface
These machines machines are on different networks. All these machines can successfully connect to other Windows 2003 FTP servers with WinSCP.

The problem does not occur using WinSCP Version 4.1.9 from a different Windows 2003 Server.

The destination Windows 2003 is restricting access with the Windows Firewall, and is configured to Passive Mode FTP restricted to Ports 5001 - 5021
I am pretty sure it is not the destination server's Firewall settings/FTP configuration because I also have Ipswitch WSFTP Pro installed on the Windows 8 PC on which WinSCP does not work (see above), and WSFTP Pro does not experience the problem.