Hi,
I have a similiar problem: initial directory listing after having connected over FTPS fails.
WinSCP runs in a Win7 VM on a Linux host. I'm behind a firewall. Therefore the host system tunnels traffic over SSH offering a local SOCKS5 proxy. WinSCP in the VM uses this proxy. FTP without SSL encryption works fine...
FTP(S) Server <--> External Proxy <-SSH-> Host system/SOCKS5 proxy:5555 <--> VM
- Firewall of the VM is deactivated
- Passive mode is activated
- I tried "Force IP address for passive mode connections" which gives me also an error. But with this configuration, the file explorer opens displaying an empty directory "/ <root>" on server side.
LOG (Without "Force IP address (...)")
. 2011-11-09 09:20:18.878 --------------------------------------------------------------------------
. 2011-11-09 09:20:18.878 WinSCP Version 4.3.2 (Build 1201) (OS 6.1.7601 Service Pack 1)
. 2011-11-09 09:20:18.878 Login time: Mittwoch, 9. November 2011 09:20:18
. 2011-11-09 09:20:18.878 --------------------------------------------------------------------------
. 2011-11-09 09:20:18.879 Session name: ***
. 2011-11-09 09:20:18.879 Host name: ftp.*** (Port: 21)
. 2011-11-09 09:20:18.879 User name: *** (Password: Yes, Key file: No)
. 2011-11-09 09:20:18.879 Tunnel: No
. 2011-11-09 09:20:18.879 Transfer Protocol: FTP
. 2011-11-09 09:20:18.879 Ping type: C, Ping interval: 30 sec; Timeout: 15 sec
. 2011-11-09 09:20:18.879 Proxy: SOCKS5
. 2011-11-09 09:20:18.879 HostName: 10.0.2.2 (Port: 5555); Username: ***; Passwd: Yes
. 2011-11-09 09:20:18.879 FTP: FTPS: Explicit SSL; Passive: Yes [Force IP: No]
. 2011-11-09 09:20:18.879 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 2011-11-09 09:20:18.879 Cache directory changes: Yes, Permanent: Yes
. 2011-11-09 09:20:18.879 DST mode: 1
. 2011-11-09 09:20:18.879 --------------------------------------------------------------------------
. 2011-11-09 09:20:18.956 Connecting to ftp.*** ...
. 2011-11-09 09:20:18.956 m_pProxyLayer changed state from 0 to 1
. 2011-11-09 09:20:18.956 m_pSslLayer changed state from 0 to 1
. 2011-11-09 09:20:18.956 m_pProxyLayer changed state from 1 to 2
. 2011-11-09 09:20:18.956 m_pSslLayer changed state from 1 to 2
. 2011-11-09 09:20:18.956 m_pProxyLayer changed state from 2 to 4
. 2011-11-09 09:20:18.973 m_pSslLayer changed state from 2 to 4
. 2011-11-09 09:20:18.975 Connected with ftp.***, negotiating SSL connection...
< 2011-11-09 09:20:19.031 220 ProFTPD 1.3.3e Server (ProFTPD) [***]
> 2011-11-09 09:20:19.032 AUTH SSL
< 2011-11-09 09:20:19.071 234 AUTH SSL successful
. 2011-11-09 09:20:19.114 SSL_connect: SSLv3 read server hello A
. 2011-11-09 09:20:19.114 SSL_connect: SSLv3 read server certificate A
. 2011-11-09 09:20:19.260 SSL_connect: SSLv3 read server key exchange A
. 2011-11-09 09:20:19.261 SSL_connect: SSLv3 read server certificate request A
. 2011-11-09 09:20:19.261 SSL_connect: SSLv3 read server done A
. 2011-11-09 09:20:19.261 SSL_connect: SSLv3 write client certificate A
. 2011-11-09 09:20:19.261 SSL_connect: SSLv3 write client key exchange A
. 2011-11-09 09:20:19.261 SSL_connect: SSLv3 write change cipher spec A
. 2011-11-09 09:20:19.261 SSL_connect: SSLv3 write finished A
. 2011-11-09 09:20:19.261 SSL_connect: SSLv3 flush data
. 2011-11-09 09:20:19.293 SSL_connect: SSLv3 read finished A
. 2011-11-09 09:20:19.299 Using TLSv1, cipher TLSv1/SSLv3: DHE-RSA-AES256-SHA, 1024 bit RSA
. 2011-11-09 09:20:19.307 SSL connection established. Waiting for welcome message...
> 2011-11-09 09:20:19.307 USER ***
< 2011-11-09 09:20:19.333 331 Password required for ***
> 2011-11-09 09:20:19.333 PASS *************
< 2011-11-09 09:20:19.393 230 User *** logged in
> 2011-11-09 09:20:19.393 SYST
< 2011-11-09 09:20:19.424 215 UNIX Type: L8
> 2011-11-09 09:20:19.427 FEAT
< 2011-11-09 09:20:19.450 211-Features:
< 2011-11-09 09:20:19.450 MDTM
< 2011-11-09 09:20:19.450 MFMT
< 2011-11-09 09:20:19.450 TVFS
< 2011-11-09 09:20:19.450 UTF8
< 2011-11-09 09:20:19.450 AUTH TLS
< 2011-11-09 09:20:19.450 MFF modify;UNIX.group;UNIX.mode;
< 2011-11-09 09:20:19.450 MLST modify*;perm*;size*;type*;unique*;UNIX.group*;UNIX.mode*;UNIX.owner*;
< 2011-11-09 09:20:19.450 LANG en-US*
< 2011-11-09 09:20:19.450 PBSZ
< 2011-11-09 09:20:19.450 PROT
< 2011-11-09 09:20:19.450 REST STREAM
< 2011-11-09 09:20:19.450 SIZE
< 2011-11-09 09:20:19.454 211 End
> 2011-11-09 09:20:19.454 OPTS UTF8 ON
< 2011-11-09 09:20:19.475 200 UTF8 set to on
> 2011-11-09 09:20:19.475 PBSZ 0
< 2011-11-09 09:20:19.507 200 PBSZ 0 successful
> 2011-11-09 09:20:19.507 PROT P
< 2011-11-09 09:20:19.520 200 Protection set to Private
. 2011-11-09 09:20:19.524 Connected
. 2011-11-09 09:20:19.524 Got reply 1 to the command 1
. 2011-11-09 09:20:19.524 --------------------------------------------------------------------------
. 2011-11-09 09:20:19.524 Using FTP protocol.
. 2011-11-09 09:20:19.527 Doing startup conversation with host.
> 2011-11-09 09:20:19.543 PWD
< 2011-11-09 09:20:19.565 257 "/" is the current directory
. 2011-11-09 09:20:19.565 Got reply 1 to the command 16
. 2011-11-09 09:20:19.581 Getting current directory name.
. 2011-11-09 09:20:19.589 Retrieving directory listing...
> 2011-11-09 09:20:19.589 TYPE A
< 2011-11-09 09:20:19.615 200 Type set to A
> 2011-11-09 09:20:19.615 PASV
. 2011-11-09 09:20:19.615 m_pProxyLayer changed state from 0 to 1
< 2011-11-09 09:20:19.639 227 Entering Passive Mode (***).
> 2011-11-09 09:20:19.639 LIST -a
. 2011-11-09 09:20:19.639 m_pProxyLayer changed state from 1 to 2
. 2011-11-09 09:20:19.639 m_pProxyLayer changed state from 2 to 4
. 2011-11-09 09:20:34.213 Timeout detected.
. 2011-11-09 09:20:34.214 Could not retrieve directory listing
. 2011-11-09 09:20:34.214 Got reply 1004 to the command 2
* 2011-11-09 09:20:34.223 (ESshFatal) Lost connection.
* 2011-11-09 09:20:34.223 Timeout detected.
* 2011-11-09 09:20:34.223 Could not retrieve directory listing
* 2011-11-09 09:20:34.223 Entering Passive Mode (***).
* 2011-11-09 09:20:34.223 Error listing directory '/'.
LOG(With "Force IP address (...)")
. 2011-11-09 09:23:41.869 --------------------------------------------------------------------------
. 2011-11-09 09:23:41.873 WinSCP Version 4.3.2 (Build 1201) (OS 6.1.7601 Service Pack 1)
. 2011-11-09 09:23:41.873 Login time: Mittwoch, 9. November 2011 09:23:41
. 2011-11-09 09:23:41.873 --------------------------------------------------------------------------
. 2011-11-09 09:23:41.873 Session name: ***
. 2011-11-09 09:23:41.873 Host name: ftp.*** (Port: 21)
. 2011-11-09 09:23:41.873 User name: *** (Password: Yes, Key file: No)
. 2011-11-09 09:23:41.873 Tunnel: No
. 2011-11-09 09:23:41.873 Transfer Protocol: FTP
. 2011-11-09 09:23:41.873 Ping type: C, Ping interval: 30 sec; Timeout: 15 sec
. 2011-11-09 09:23:41.873 Proxy: SOCKS5
. 2011-11-09 09:23:41.874 HostName: 10.0.2.2 (Port: 5555); Username: ***; Passwd: Yes
. 2011-11-09 09:23:41.874 FTP: FTPS: Explicit SSL; Passive: Yes [Force IP: Yes]
. 2011-11-09 09:23:41.874 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 2011-11-09 09:23:41.874 Cache directory changes: Yes, Permanent: Yes
. 2011-11-09 09:23:41.874 DST mode: 1
. 2011-11-09 09:23:41.874 --------------------------------------------------------------------------
. 2011-11-09 09:23:41.907 Connecting to ftp.*** ...
. 2011-11-09 09:23:41.919 m_pProxyLayer changed state from 0 to 1
. 2011-11-09 09:23:41.919 m_pSslLayer changed state from 0 to 1
. 2011-11-09 09:23:41.919 m_pProxyLayer changed state from 1 to 2
. 2011-11-09 09:23:41.920 m_pSslLayer changed state from 1 to 2
. 2011-11-09 09:23:41.921 m_pProxyLayer changed state from 2 to 4
. 2011-11-09 09:23:41.945 m_pSslLayer changed state from 2 to 4
. 2011-11-09 09:23:41.961 Connected with ftp.***, negotiating SSL connection...
< 2011-11-09 09:23:42.028 220 ProFTPD 1.3.3e Server (ProFTPD) [***]
> 2011-11-09 09:23:42.028 AUTH SSL
< 2011-11-09 09:23:42.081 234 AUTH SSL successful
. 2011-11-09 09:23:42.234 SSL_connect: SSLv3 read server hello A
. 2011-11-09 09:23:42.234 SSL_connect: SSLv3 read server certificate A
. 2011-11-09 09:23:42.234 SSL_connect: SSLv3 read server key exchange A
. 2011-11-09 09:23:42.234 SSL_connect: SSLv3 read server certificate request A
. 2011-11-09 09:23:42.234 SSL_connect: SSLv3 read server done A
. 2011-11-09 09:23:42.234 SSL_connect: SSLv3 write client certificate A
. 2011-11-09 09:23:42.234 SSL_connect: SSLv3 write client key exchange A
. 2011-11-09 09:23:42.234 SSL_connect: SSLv3 write change cipher spec A
. 2011-11-09 09:23:42.234 SSL_connect: SSLv3 write finished A
. 2011-11-09 09:23:42.234 SSL_connect: SSLv3 flush data
. 2011-11-09 09:23:42.271 SSL_connect: SSLv3 read finished A
. 2011-11-09 09:23:42.281 Using TLSv1, cipher TLSv1/SSLv3: DHE-RSA-AES256-SHA, 1024 bit RSA
. 2011-11-09 09:23:42.286 SSL connection established. Waiting for welcome message...
> 2011-11-09 09:23:42.286 USER ***
< 2011-11-09 09:23:42.514 331 Password required for ***
> 2011-11-09 09:23:42.514 PASS *************
< 2011-11-09 09:23:42.592 230 User *** logged in
> 2011-11-09 09:23:42.592 SYST
< 2011-11-09 09:23:42.629 215 UNIX Type: L8
> 2011-11-09 09:23:42.629 FEAT
< 2011-11-09 09:23:42.657 211-Features:
< 2011-11-09 09:23:42.658 MDTM
< 2011-11-09 09:23:42.658 MFMT
< 2011-11-09 09:23:42.658 TVFS
< 2011-11-09 09:23:42.658 UTF8
< 2011-11-09 09:23:42.658 AUTH TLS
< 2011-11-09 09:23:42.658 MFF modify;UNIX.group;UNIX.mode;
< 2011-11-09 09:23:42.658 MLST modify*;perm*;size*;type*;unique*;UNIX.group*;UNIX.mode*;UNIX.owner*;
< 2011-11-09 09:23:42.658 LANG en-US*
< 2011-11-09 09:23:42.658 PBSZ
< 2011-11-09 09:23:42.658 PROT
< 2011-11-09 09:23:42.658 REST STREAM
< 2011-11-09 09:23:42.658 SIZE
< 2011-11-09 09:23:42.658 211 End
> 2011-11-09 09:23:42.658 OPTS UTF8 ON
< 2011-11-09 09:23:42.690 200 UTF8 set to on
> 2011-11-09 09:23:42.690 PBSZ 0
< 2011-11-09 09:23:42.716 200 PBSZ 0 successful
> 2011-11-09 09:23:42.716 PROT P
< 2011-11-09 09:23:42.741 200 Protection set to Private
. 2011-11-09 09:23:42.742 Connected
. 2011-11-09 09:23:42.743 Got reply 1 to the command 1
. 2011-11-09 09:23:42.743 --------------------------------------------------------------------------
. 2011-11-09 09:23:42.743 Using FTP protocol.
. 2011-11-09 09:23:42.747 Doing startup conversation with host.
> 2011-11-09 09:23:42.754 PWD
< 2011-11-09 09:23:42.788 257 "/" is the current directory
. 2011-11-09 09:23:42.788 Got reply 1 to the command 16
. 2011-11-09 09:23:42.789 Getting current directory name.
. 2011-11-09 09:23:42.801 Retrieving directory listing...
> 2011-11-09 09:23:42.801 TYPE A
< 2011-11-09 09:23:42.826 200 Type set to A
> 2011-11-09 09:23:42.826 PASV
. 2011-11-09 09:23:42.826 m_pProxyLayer changed state from 0 to 1
< 2011-11-09 09:23:42.855 227 Entering Passive Mode (***).
. 2011-11-09 09:23:42.855 GetPeerName failed
. 2011-11-09 09:23:42.855 Could not retrieve directory listing
. 2011-11-09 09:23:42.855 Got reply 4 to the command 2
. 2011-11-09 09:23:42.865 Retrieving directory listing...
> 2011-11-09 09:23:42.865 TYPE A
< 2011-11-09 09:23:42.885 200 Type set to A
> 2011-11-09 09:23:42.885 PASV
. 2011-11-09 09:23:42.885 m_pProxyLayer changed state from 0 to 1
< 2011-11-09 09:23:42.923 227 Entering Passive Mode (***).
. 2011-11-09 09:23:42.923 GetPeerName failed
. 2011-11-09 09:23:42.924 Could not retrieve directory listing
. 2011-11-09 09:23:42.924 Got reply 4 to the command 2
* 2011-11-09 09:23:42.924 (ECommand) Error listing directory '/'.
* 2011-11-09 09:23:42.924 GetPeerName failed
* 2011-11-09 09:23:42.924 Could not retrieve directory listing
* 2011-11-09 09:23:42.924 Entering Passive Mode (***).
. 2011-11-09 09:23:43.002 Session upkeep
. 2011-11-09 09:23:43.051 Session upkeep
. 2011-11-09 09:23:43.494 Session upkeep
. 2011-11-09 09:23:43.745 Startup conversation with host finished.
. 2011-11-09 09:23:43.801 Session upkeep
. 2011-11-09 09:23:43.976 Session upkeep
. 2011-11-09 09:23:44.475 Session upkeep
. 2011-11-09 09:23:44.973 Session upkeep
. 2011-11-09 09:23:45.460 Session upkeep
. 2011-11-09 09:23:45.951 Session upkeep
. 2011-11-09 09:23:46.448 Session upkeep
. 2011-11-09 09:23:46.940 Session upkeep
. 2011-11-09 09:23:47.420 Session upkeep
. 2011-11-09 09:23:47.915 Session upkeep
. 2011-11-09 09:23:48.402 Session upkeep
. 2011-11-09 09:23:48.892 Session upkeep
. 2011-11-09 09:23:49.389 Session upkeep
. 2011-11-09 09:23:49.873 Session upkeep
. 2011-11-09 09:23:50.361 Session upkeep
. 2011-11-09 09:23:50.854 Session upkeep
. 2011-11-09 09:23:51.347 Session upkeep
. 2011-11-09 09:23:51.837 Session upkeep
. 2011-11-09 09:23:52.344 Session upkeep
. 2011-11-09 09:23:52.837 Session upkeep
. 2011-11-09 09:23:53.333 Session upkeep
. 2011-11-09 09:23:53.874 Session upkeep
. 2011-11-09 09:23:54.414 Session upkeep
. 2011-11-09 09:23:54.950 Session upkeep
. 2011-11-09 09:23:55.486 Session upkeep
. 2011-11-09 09:23:56.026 Session upkeep
. 2011-11-09 09:23:56.562 Session upkeep
. 2011-11-09 09:23:57.105 Session upkeep
. 2011-11-09 09:23:57.643 Session upkeep
. 2011-11-09 09:23:58.184 Session upkeep
. 2011-11-09 09:23:58.719 Session upkeep
. 2011-11-09 09:23:59.283 Session upkeep
. 2011-11-09 09:23:59.831 Session upkeep
. 2011-11-09 09:24:00.368 Session upkeep
. 2011-11-09 09:24:00.903 Session upkeep
. 2011-11-09 09:24:01.469 Session upkeep
. 2011-11-09 09:24:01.977 Session upkeep
. 2011-11-09 09:24:02.529 Session upkeep
. 2011-11-09 09:23:43.798 Disconnected from server
Do you have any idea why this happens?
Thanks!