12:53 - Sunday, 20 April 2014

WinSCP Not Listing Directory Problem

#Topics: winscp Could not retrieve directory listing,WINSCP and FTPS not working,winscp azure ftp timeout directory listing,winscp directory listing,winscp error listing directory

I’m trying to use winSCP to FTP my server using FTPs and then synch with a backup folder. I have had this working fine from a PC on my work intranet (i.e. the same domain) however when I try to set it up off site (which is my whole point) the same script fails. The FTP log is as follows..

. 2010-09-09 15:28:30.952 --------------------------------------------------------------------------. 2010-09-09 15:28:30.952 WinSCP Version 4.2.8 (Build 818) (OS 5.2.3790 Service Pack 2). 2010-09-09 15:28:30.952 Login time: 09 September 2010 15:28:30. 2010-09-09 15:28:30.952 --------------------------------------------------------------------------. 2010-09-09 15:28:30.952 Session name: [email protected] 2010-09-09 15:28:30.952 Host name: myserver.nhs.uk (Port: 21). 2010-09-09 15:28:30.952 User name: user1 (Password: Yes, Key file: No). 2010-09-09 15:28:30.952 Tunnel: No. 2010-09-09 15:28:30.952 Transfer Protocol: FTP. 2010-09-09 15:28:30.952 Ping type: C, Ping interval: 30 sec; Timeout: 15 sec. 2010-09-09 15:28:30.952 Proxy: none. 2010-09-09 15:28:30.952 FTP: FTPS: Explicit SSL; Passive: No [Force IP: No]. 2010-09-09 15:28:30.952 Local directory: default, Remote directory: home, Update: No, Cache: Yes. 2010-09-09 15:28:30.952 Cache directory changes: Yes, Permanent: Yes. 2010-09-09 15:28:30.952 DST mode: 1. 2010-09-09 15:28:30.952 --------------------------------------------------------------------------. 2010-09-09 15:28:30.968 Connecting to myserver.nhs.uk .... 2010-09-09 15:28:30.984 Connected with myserver.nhs.uk, negotiating SSL connection... 2010-09-09 15:28:30.999 AUTH SSL 2010-09-09 15:28:31.187 USER user1 2010-09-09 15:28:31.218 PASS ******** 2010-09-09 15:28:31.234 SYST 2010-09-09 15:28:31.265 FEAT< 2010-09-09 15:28:31.281 211-Extended features supported:< 2010-09-09 15:28:31.281  LANG EN*< 2010-09-09 15:28:31.281  UTF8< 2010-09-09 15:28:31.281  AUTH TLS;TLS-C;SSL;TLS-P;< 2010-09-09 15:28:31.281  PBSZ< 2010-09-09 15:28:31.281  PROT C;P;< 2010-09-09 15:28:31.281  CCC< 2010-09-09 15:28:31.296  HOST< 2010-09-09 15:28:31.296  SIZE< 2010-09-09 15:28:31.296  MDTM< 2010-09-09 15:28:31.296  REST STREAM 2010-09-09 15:28:31.296 OPTS UTF8 ON 2010-09-09 15:28:31.312 PBSZ 0 2010-09-09 15:28:31.343 PROT P 2010-09-09 15:28:31.359 PWD 2010-09-09 15:28:31.390 TYPE A 2010-09-09 15:28:31.421 PORT 10,222,54,3,6,38 2010-09-09 15:28:31.437 LIST -a< 2010-09-09 15:28:31.468 150 Opening ASCII mode data connection.. 2010-09-09 15:28:46.968 Timeout detected.. 2010-09-09 15:28:46.968 Could not retrieve directory listing* 2010-09-09 15:28:46.968 (ESshFatal) Lost connection.* 2010-09-09 15:28:46.968 Timeout detected.* 2010-09-09 15:28:46.968 Could not retrieve directory listing* 2010-09-09 15:28:46.968 Opening ASCII mode data connection.* 2010-09-09 15:28:46.968 Error listing directory '/'.. 2010-09-09 15:28:51.999 Connecting to myserver.nhs.uk .... 2010-09-09 15:28:52.015 Connected with myserver.nhs.uk, negotiating SSL connection... 2010-09-09 15:28:52.031 AUTH SSL 2010-09-09 15:28:52.140 USER user1 2010-09-09 15:28:52.156 PASS ******** 2010-09-09 15:28:52.187 SYST 2010-09-09 15:28:52.202 FEAT< 2010-09-09 15:28:52.234 211-Extended features supported:< 2010-09-09 15:28:52.234  LANG EN*< 2010-09-09 15:28:52.234  UTF8< 2010-09-09 15:28:52.234  AUTH TLS;TLS-C;SSL;TLS-P;< 2010-09-09 15:28:52.234  PBSZ< 2010-09-09 15:28:52.234  PROT C;P;< 2010-09-09 15:28:52.234  CCC< 2010-09-09 15:28:52.234  HOST< 2010-09-09 15:28:52.234  SIZE< 2010-09-09 15:28:52.234  MDTM< 2010-09-09 15:28:52.234  REST STREAM 2010-09-09 15:28:52.234 OPTS UTF8 ON 2010-09-09 15:28:52.265 PBSZ 0 2010-09-09 15:28:52.281 PROT P 2010-09-09 15:28:52.312 PWD 2010-09-09 15:28:52.343 TYPE A 2010-09-09 15:28:52.359 PORT 10,222,54,3,6,40 2010-09-09 15:28:52.390 LIST -a< 2010-09-09 15:28:52.406 150 Opening ASCII mode data connection.

This fails whether I run from GUI or a previously tested and working scripted version. It looks from the log like theres a problem with a timeout on the directory listing, presumably it works locally as less lag

Any ideas if this is a winSCP setting (and if so where) or on the FTPserver side (Windows Web Server 2008 R2) ?

I ran into this problem when I forgot to open the extra ports that Passive FTP mode requires.

Basically, you need to open/allow a range of ports through your firewall in addition port 21 that you have already opened.

It looks like you are using Microsoft’s FTP Server. Microsoft has a support page with instructions here.

When I did this, I opened port 21 for the control port, and then arbitrarily chose ports 65000-65050 for the Passive FTP Data. Your range will vary based on the number of concurrent users/sessions you need or expect (more concurrent users/sessions require more open ports) and any other ports that are already open for other applications.

Share

Advertisement

Comment