Invalid response to PWD command

Advertisement

diam0nds
Guest

Invalid response to PWD command

Hi,
I am going crazy in using COM library on windows server 2012 R2.
My program has been running smoothly for years, interfacing with several ftp servers.
Now i have to connect on a new ftp server but my application doesn't work.

Using the GUI winscp or filezilla it connects correctly.

What can this difference in behavior depend on?

WRONG CONNECTION LOG
2021-03-01 16:47:30.184 Connecting to XX.XX.XX.XX ...
. 2021-03-01 16:47:30.219 Connected with XX.XX.XX.XX Waiting for welcome message...
< 2021-03-01 16:47:30.250 220 Microsoft FTP Service
> 2021-03-01 16:47:30.250 USER XXXXX
< 2021-03-01 16:47:30.280 331 Password required
> 2021-03-01 16:47:30.281 PASS ************
< 2021-03-01 16:47:30.315 230 User logged in.
< 2021-03-01 16:47:30.315 500 Command not understood.
< 2021-03-01 16:47:30.315 500 Command not understood.
> 2021-03-01 16:47:30.315 SYST
> 2021-03-01 16:47:30.315 FEAT
. 2021-03-01 16:47:30.316 Connected
. 2021-03-01 16:47:30.316 --------------------------------------------------------------------------
. 2021-03-01 16:47:30.316 Using FTP protocol.
. 2021-03-01 16:47:30.316 Doing startup conversation with host.
> 2021-03-01 16:47:30.316 PWD
< 2021-03-01 16:47:30.347 215 Windows_NT
. 2021-03-01 16:47:30.347 Getting current directory name.
> 2021-03-01 16:47:30.347 PWD
< 2021-03-01 16:47:30.377 211-Extended features supported:
< 2021-03-01 16:47:30.377  LANG EN*
< 2021-03-01 16:47:30.377  UTF8
< 2021-03-01 16:47:30.377  AUTH TLS;TLS-C;SSL;TLS-P;
< 2021-03-01 16:47:30.377  PBSZ
< 2021-03-01 16:47:30.377  PROT C;P;
< 2021-03-01 16:47:30.378  CCC
< 2021-03-01 16:47:30.378  HOST
< 2021-03-01 16:47:30.378  SIZE
< 2021-03-01 16:47:30.378  MDTM
< 2021-03-01 16:47:30.378  REST STREAM
< 2021-03-01 16:47:30.378 211 END
* 2021-03-01 16:47:30.378 (ECommand) Error getting name of current remote directory.
* 2021-03-01 16:47:30.378 Invalid response to PWD command 'Extended features supported:
* 2021-03-01 16:47:30.378 LANG EN*
* 2021-03-01 16:47:30.378 UTF8
* 2021-03-01 16:47:30.378 AUTH TLS;TLS-C;SSL;TLS-P;
* 2021-03-01 16:47:30.378 PBSZ
* 2021-03-01 16:47:30.379 PROT C;P;
* 2021-03-01 16:47:30.379 CCC
* 2021-03-01 16:47:30.379 HOST
* 2021-03-01 16:47:30.379 SIZE
* 2021-03-01 16:47:30.379 MDTM
* 2021-03-01 16:47:30.379 REST STREAM
* 2021-03-01 16:47:30.379 END
* 2021-03-01 16:47:30.379 '.
. 2021-03-01 16:47:30.379 Attempt to close connection due to fatal exception:
* 2021-03-01 16:47:30.379 (Exception) Invalid response to PWD command 'Windows_NT
 
* 2021-03-01 16:47:30.380 '.
< 2021-03-01 16:47:30.380 257 "/XXXXX" is current directory.
. 2021-03-01 16:47:30.381 Disconnected from server

CONNECTION LOG FROM WINSCP.EXE
. 2021-03-02 19:01:39.832 --------------------------------------------------------------------------
. 2021-03-02 19:01:39.849 Connecting to XX.XX.XX.XX ...
. 2021-03-02 19:01:39.867 Connected with XX.XX.XX.XX. Waiting for welcome message...
< 2021-03-02 19:01:39.898 220 Microsoft FTP Service
> 2021-03-02 19:01:39.898 USER XXXXXXX
< 2021-03-02 19:01:39.929 331 Password required
> 2021-03-02 19:01:39.929 PASS ********
< 2021-03-02 19:01:39.962 230 User logged in.
> 2021-03-02 19:01:39.962 SYST
. 2021-03-02 19:01:39.992 The server is probably running Windows, assuming that directory listing timestamps are affected by DST.
< 2021-03-02 19:01:39.992 215 Windows_NT
> 2021-03-02 19:01:39.992 FEAT
< 2021-03-02 19:01:40.025 211-Extended features supported:
< 2021-03-02 19:01:40.025  LANG EN*
< 2021-03-02 19:01:40.025  UTF8
< 2021-03-02 19:01:40.025  AUTH TLS;TLS-C;SSL;TLS-P;
< 2021-03-02 19:01:40.036  PBSZ
< 2021-03-02 19:01:40.036  PROT C;P;
< 2021-03-02 19:01:40.036  CCC
< 2021-03-02 19:01:40.036  HOST
< 2021-03-02 19:01:40.036  SIZE
< 2021-03-02 19:01:40.036  MDTM
< 2021-03-02 19:01:40.036  REST STREAM
< 2021-03-02 19:01:40.036 211 END
> 2021-03-02 19:01:40.036 OPTS UTF8 ON
< 2021-03-02 19:01:40.056 200 OPTS UTF8 command successful - UTF8 encoding now ON.
. 2021-03-02 19:01:40.106 Connected
. 2021-03-02 19:01:40.106 --------------------------------------------------------------------------
. 2021-03-02 19:01:40.106 Using FTP protocol.
. 2021-03-02 19:01:40.107 Doing startup conversation with host.
> 2021-03-02 19:01:40.118 PWD
< 2021-03-02 19:01:40.149 257 "/XXXXX" is current directory.
. 2021-03-02 19:01:40.149 Getting current directory name.
. 2021-03-02 19:01:40.201 Retrieving directory listing...
> 2021-03-02 19:01:40.201 TYPE A
< 2021-03-02 19:01:40.232 200 Type set to A.
> 2021-03-02 19:01:40.232 PASV
< 2021-03-02 19:01:40.264 227 Entering Passive Mode (XX,XX,XX,XX,XX,XX).
> 2021-03-02 19:01:40.264 LIST -a
. 2021-03-02 19:01:40.264 Connecting to XX.XX.XX.XX:XXXXX ...
< 2021-03-02 19:01:40.296 150 Opening ASCII mode data connection.
. 2021-03-02 19:01:40.326 Data connection closed

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,286
Location:
Prague, Czechia

Re: Invalid response to PWD command

Can you attach complete logs (including the header)? Are you using the latest version of WinSCP?

Reply with quote

diam0nds
Joined:
Posts:
2

Hi Martin and thanks for replying.

I'm using WinSCP Version 5.18.2 beta (Build 11097)
I'm attacching log and debug log below.

Thanks.
  • logdebug.txt (55.6 KB, Private file)
Description: Debug Log
  • log.txt (5.21 KB, Private file)
Description: Full log

Reply with quote

diam0nds
Joined:
Posts:
2

Sorry but I didn't understand.
Attached you will find the log of the gui, in the previous post there is the log of the .net assembly.

thanks
  • GUI LOG.txt (4.89 KB, Private file)

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,286
Location:
Prague, Czechia

Are you sure you are connecting to the same server in GUI and the .NET assembly? Did you double check the address? Also the credentials.

Unfortunately the logs are so anonymized that they are not really useful for troubleshooting this.

Are you able to do a network capture of both connections?

Reply with quote

Advertisement

You can post new topics in this forum