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

martin

Re: FTPS error, Invalid Response to 'PWD' command

@Niall: This thread is about a bug in custom FTP server. It's unlikely that you are having the same problem. Please start a new thread and post a complete session log file.
Niall

Re: FTPS error, Invalid Response to 'PWD' command

Hi,

I am also getting this exact error. What was the fix? is there configuration I can change? I am using version 5.19.2

Thanks
tajinder

Re: FTPS error, Invalid Response to 'PWD' command

Thanks for quick reply.
And many thanks for hitting on the exact area of problem. Because of different reported error and logs, and because of unsecured connection and other FTP clients working fine with this, I never noticed problem with FEAT command.

And after fixing the FEAT command, WinSCP opens up the connection perfectly.

BTW it's an embedded FTP server (not a desktop one), and I am working on it to enable its security.
martin

Re: FTPS error, Invalid Response to 'PWD' command

Thanks for your report.

I think the problem is the:
< 2016-01-06 12:19:34.750 FEAT


What server is that?

Can you send me an email, so I can send you back a debug version of WinSCP to track the problem? Please include link back to this topic in your email. Also note in this topic that you have sent the email. Thanks.

You will find my address (if you log in) in my forum profile.
taj

FTPS error, Invalid Response to 'PWD' command

I have seen the another post of this error, but that is a different issue.

I have a server, in which I just enabled the FTPS. It is working fine with FileZilla with Passive Explicit FTPS connection.
Using WinSCP, I am able to make unsecured connection. But using FTPS (Explicit - passive) connection, I am receiving error
Invalid Response to 'PWD' command.

The reason I feel is the little delayed response to the command. WinSCP sends PBSZ & PROT command simultaneously. And server replies to command one by one. But before it replies to second command, WinSCP sends PWD command, and server still replies to old command and then to PWD command.

Please confirm, if this is the issue and how it can be resolved.
Note, that error is not reported when it occurred, but after the data part of LIST command is successfully transferred.
. 2016-01-06 12:19:28.625 --------------------------------------------------------------------------
. 2016-01-06 12:19:28.625 WinSCP Version 5.7.6 (Build 5874) (OS 5.1.2600 Service Pack 3 - Microsoft Windows XP)
. 2016-01-06 12:19:28.640 Configuration: C:\fw\ftp\WinSCP.ini
. 2016-01-06 12:19:28.640 Log level: Debug 2
. 2016-01-06 12:19:28.640 Command-line: "C:\fw\ftp\WinSCP.exe"
. 2016-01-06 12:19:28.640 Time zone: Current: GMT-6, Standard: GMT-6 (Central Standard Time), DST: GMT-5 (Central Daylight Time), DST Start: 3/13/2016, DST End: 11/6/2016
. 2016-01-06 12:19:28.640 Login time: Wednesday, January 06, 2016 12:19:28 PM
. 2016-01-06 12:19:28.640 --------------------------------------------------------------------------
. 2016-01-06 12:19:28.640 Session name: abc@172.28.176.1 (Modified site)
. 2016-01-06 12:19:28.640 Host name: 172.28.176.1 (Port: 21)
. 2016-01-06 12:19:28.640 User name: abc (Password: No, Key file: No)
. 2016-01-06 12:19:28.640 Transfer Protocol: FTP
. 2016-01-06 12:19:28.640 Ping type: -, Ping interval: 30 sec; Timeout: 200 sec
. 2016-01-06 12:19:28.640 Disable Nagle: No
. 2016-01-06 12:19:28.640 Proxy: none
. 2016-01-06 12:19:28.640 Send buffer: 262144
. 2016-01-06 12:19:28.640 UTF: 2
. 2016-01-06 12:19:28.640 FTP: FTPS: Explicit TLS; Passive: Yes [Force IP: -]; MLSD: - [List all: -]
. 2016-01-06 12:19:28.640 Session reuse: Yes
. 2016-01-06 12:19:28.640 TLS/SSL versions: TLSv1.1-TLSv1.2
. 2016-01-06 12:19:28.640 Cache directory changes: Yes, Permanent: Yes
. 2016-01-06 12:19:28.640 Timezone offset: 0h 0m
. 2016-01-06 12:19:28.640 --------------------------------------------------------------------------
. 2016-01-06 12:19:28.640 Session upkeep
. 2016-01-06 12:19:28.718 Connecting to 172.28.176.1 ...
. 2016-01-06 12:19:28.718 TLS layer changed state from unconnected to connecting
. 2016-01-06 12:19:28.718 TLS layer changed state from connecting to connected
. 2016-01-06 12:19:28.718 Connected with 172.28.176.1, negotiating TLS connection...
< 2016-01-06 12:19:28.718 220 Nucleus FTP Server (Version 1.5) ready.
> 2016-01-06 12:19:28.718 AUTH TLS
< 2016-01-06 12:19:28.718 234 SSL enabled... Start negotiation
. 2016-01-06 12:19:28.750 TLS connect: SSLv3 read server hello A
. 2016-01-06 12:19:28.765 TLS connect: SSLv3 read server certificate A
. 2016-01-06 12:19:28.765 TLS connect: SSLv3 read server done A
. 2016-01-06 12:19:28.765 TLS connect: SSLv3 write client key exchange A
. 2016-01-06 12:19:28.765 TLS connect: SSLv3 write change cipher spec A
. 2016-01-06 12:19:28.765 TLS connect: SSLv3 write finished A
. 2016-01-06 12:19:28.765 TLS connect: SSLv3 flush data
. 2016-01-06 12:19:30.625 TLS connect: SSLv3 read finished A
. 2016-01-06 12:19:30.640 Using TLSv1.2, cipher TLSv1/SSLv3: AES256-SHA256, 1024 bit RSA
. 2016-01-06 12:19:30.656 TLS connection established. Waiting for welcome message...
> 2016-01-06 12:19:30.656 USER abc
< 2016-01-06 12:19:30.656 331 User name okay, need password.
> 2016-01-06 12:19:34.734 PASS ****
< 2016-01-06 12:19:34.734 230 User logged in, proceed.
> 2016-01-06 12:19:34.734 SYST
< 2016-01-06 12:19:34.734 215 UNIX Type: L8 Version: Nucleus-ftpd
> 2016-01-06 12:19:34.734 FEAT
< 2016-01-06 12:19:34.750 FEAT
< 2016-01-06 12:19:34.750 211-Extensions supported
< 2016-01-06 12:19:34.750  AUTH TLS
< 2016-01-06 12:19:34.750  PBSZ
< 2016-01-06 12:19:34.750  PROT
< 2016-01-06 12:19:34.750 211 END
[color=red]> 2016-01-06 12:19:34.750 PBSZ 0
> 2016-01-06 12:19:34.750 PROT P[/color]
< 2016-01-06 12:19:34.750 200 Command okay.
. 2016-01-06 12:19:34.781 Connected
. 2016-01-06 12:19:34.781 Got reply 1 to the command 1
. 2016-01-06 12:19:34.781 --------------------------------------------------------------------------
. 2016-01-06 12:19:34.781 Using FTP protocol.
. 2016-01-06 12:19:34.781 Doing startup conversation with host.
> 2016-01-06 12:19:34.843 PWD
[color=red]< 2016-01-06 12:19:34.843 200 Command okay.[/color]
. 2016-01-06 12:19:34.843 Got reply 1 to the command 16
. 2016-01-06 12:19:34.843 Getting current directory name.
[color=green]> 2016-01-06 12:19:34.843 PWD
< 2016-01-06 12:19:34.953 257 "A:/" is the current working directory.[/color]
. 2016-01-06 12:19:34.953 Got reply 1 to the command 16
< 2016-01-06 12:19:35.140 257 "A:/" is the current working directory.
. 2016-01-06 12:19:35.140 Retrieving directory listing...
> 2016-01-06 12:19:35.140 TYPE A
< 2016-01-06 12:19:35.140 200 Command okay.
> 2016-01-06 12:19:35.140 PASV
< 2016-01-06 12:19:35.156 227 Entering Passive Mode (172,28,176,1,175,59)
> 2016-01-06 12:19:35.156 LIST
. 2016-01-06 12:19:35.156 Connecting to 172.28.176.1:44859 ...
. 2016-01-06 12:19:35.156 Data connection opened
. 2016-01-06 12:19:35.156 Trying reuse main TLS session ID
. 2016-01-06 12:19:35.156 TLS layer changed state from none to connected
. 2016-01-06 12:19:35.171 Main TLS session ID not reused, will not try again
< 2016-01-06 12:19:36.968 150 File status okay; about to open data connection.
. 2016-01-06 12:19:36.984 TLS layer changed state from connected to closed
. 2016-01-06 12:19:37.031 TLS connection established
. 2016-01-06 12:19:37.031 Data connection closed
. 2016-01-06 12:19:37.031 drw-rw-rw-   1 owner    group               0 Apr 21  2:42 ROOT
. 2016-01-06 12:19:37.031 -rw-rw-rw-   1 owner    group             609 Apr 21  2:42 srv_key.der
. 2016-01-06 12:19:37.031 -rw-rw-rw-   1 owner    group            7882 Apr 21  2:43 8010.db
. 2016-01-06 12:19:37.031 -rw-rw-rw-   1 owner    group            1511 Apr 21  2:43 8010.zdb
< 2016-01-06 12:19:37.156 226 Closing data connection.  Requested file action successful.
. 2016-01-06 12:19:37.156 Directory listing successful
. 2016-01-06 12:19:37.156 Got reply 1 to the command 2
. 2016-01-06 12:19:37.156 ..;D;0;1899-12-30T06:00:00.000Z;"" [0];"" [0];---------;0
. 2016-01-06 12:19:37.156 ROOT;D;0;2015-04-21T07:42:00.000Z;"owner" [0];"group" [0];rw-rw-rw-;1
. 2016-01-06 12:19:37.156 srv_key.der;-;609;2015-04-21T07:42:00.000Z;"owner" [0];"group" [0];rw-rw-rw-;1
. 2016-01-06 12:19:37.156 8010.db;-;7882;2015-04-21T07:43:00.000Z;"owner" [0];"group" [0];rw-rw-rw-;1
. 2016-01-06 12:19:37.171 8010.zdb;-;1511;2015-04-21T07:43:00.000Z;"owner" [0];"group" [0];rw-rw-rw-;1
. 2016-01-06 12:19:37.296 Attempt to close connection due to fatal exception:
[color=red]* 2016-01-06 12:19:37.296 (Exception) Invalid response to PWD command 'Command okay.[/color]
* 2016-01-06 12:19:37.296 '.
. 2016-01-06 12:19:37.296 Got reply 1004 to the command 2
* 2016-01-06 12:19:37.296 (EFatal) Invalid response to PWD command 'Command okay.
* 2016-01-06 12:19:37.296 '.
. 2016-01-06 12:19:39.125 Disconnected from server

Any help would be greatly appreciated.