Topic "Is is possible to disable the PWD command which is sent when a session start ?"

Author Message
franck140
[View user's profile]

Joined: 2015-06-24
Posts: 1
Hello,

I am trying to open (in batch mode, ie using a little script) a ftp connection with a FTP server which is a bit "special" : indeed some commands are not available on this server (such as DIR, PWD, etc.).

It seems that during the startup conversation with the host, winscp automatically sends the command PWD, which triggers an error from the ftp server so the connection is closed:
...
. 2015-06-24 17:59:39.936 --------------------------------------------------------------------------
. 2015-06-24 17:59:39.936 Connecting to vakayl.lu ...
. 2015-06-24 17:59:39.951 Connected with vakayl.lu. Waiting for welcome message...
< 2015-06-24 17:59:39.951 220 Welcome to EAS File Service!
> 2015-06-24 17:59:39.951 USER abc
< 2015-06-24 17:59:39.951 331 User name is OK. Password needed for:abc
> 2015-06-24 17:59:39.951 PASS ***
< 2015-06-24 17:59:40.061 230 User logged in
> 2015-06-24 17:59:40.061 SYST
< 2015-06-24 17:59:42.057 502 Command not implemented
> 2015-06-24 17:59:42.057 FEAT
< 2015-06-24 17:59:42.057 211- Extensions supported:
< 2015-06-24 17:59:42.057 AUTH TLS
< 2015-06-24 17:59:42.057 PBSZ
< 2015-06-24 17:59:42.057 PROT
< 2015-06-24 17:59:42.057 CCC
< 2015-06-24 17:59:42.057 211 END
. 2015-06-24 17:59:42.057 Connected
. 2015-06-24 17:59:42.057 --------------------------------------------------------------------------
. 2015-06-24 17:59:42.057 Using FTP protocol.
. 2015-06-24 17:59:42.073 Doing startup conversation with host.
> 2015-06-24 17:59:42.073 PWD
< 2015-06-24 17:59:44.070 502 Command not implemented
. 2015-06-24 17:59:44.070 Getting current directory name.
> 2015-06-24 17:59:44.070 PWD
< 2015-06-24 17:59:46.082 502 Command not implemented
* 2015-06-24 17:59:46.082 (ECommand) Error getting name of current remote directory.
* 2015-06-24 17:59:46.082 Command not implemented
. 2015-06-24 17:59:46.082 Attempt to close connection due to fatal exception:
* 2015-06-24 17:59:46.082 (ExtException) **Command not implemented**
. 2015-06-24 17:59:46.082 Disconnected from server

=> is it possible to turn off the automatic sending of the command PWD ?

Many thanks
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
No, you cannot disable it.
_________________
Martin Prikryl
petr skypala

Guest


Hi, same problem here.

The FTP server is actually a network printer. So there is no chance of changing the implementation of the server.


. 2015-08-05 09:57:53.324 --------------------------------------------------------------------------
. 2015-08-05 09:57:53.324 WinSCP Version 5.7.1 (Build 5235) (OS 6.1.7601 Service Pack 1 - Windows Server 2008 R2 Enterprise)

...

. 2015-08-05 09:57:53.324 --------------------------------------------------------------------------
. 2015-08-05 09:57:53.324 Session name: port1@10.11.20.247 (Ad-Hoc site)
. 2015-08-05 09:57:53.324 Host name: 10.11.20.247 (Port: 21)
. 2015-08-05 09:57:53.324 User name: port1 (Password: Yes, Key file: No)
. 2015-08-05 09:57:53.324 Transfer Protocol: FTP
. 2015-08-05 09:57:53.324 Ping type: C, Ping interval: 30 sec; Timeout: 15 sec
. 2015-08-05 09:57:53.324 Disable Nagle: No
. 2015-08-05 09:57:53.324 Proxy: none
. 2015-08-05 09:57:53.324 Send buffer: 262144
. 2015-08-05 09:57:53.324 UTF: 2
. 2015-08-05 09:57:53.324 FTP: FTPS: None; Passive: Yes [Force IP: A]; MLSD: A [List all: A]
. 2015-08-05 09:57:53.324 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2015-08-05 09:57:53.324 Cache directory changes: Yes, Permanent: Yes
. 2015-08-05 09:57:53.324 Timezone offset: 0h 0m
. 2015-08-05 09:57:53.324 --------------------------------------------------------------------------
. 2015-08-05 09:57:53.324 Session upkeep
. 2015-08-05 09:57:53.387 Connecting to 10.11.20.247 ...
. 2015-08-05 09:57:53.387 Connected with 10.11.20.247. Waiting for welcome message...
< 2015-08-05 09:57:53.387 220 Treck FTP server ready.
> 2015-08-05 09:57:53.387 USER port1
< 2015-08-05 09:57:53.387 331 User name okay, need password.
> 2015-08-05 09:57:53.387 PASS *****
< 2015-08-05 09:57:53.387 230 User logged in, proceed.
> 2015-08-05 09:57:53.387 SYST
< 2015-08-05 09:57:53.403 502 SYST command not implemented, or not allowed.
> 2015-08-05 09:57:53.403 FEAT
< 2015-08-05 09:57:53.403 500 Syntax error, command unrecognized.
. 2015-08-05 09:57:53.449 Connected
. 2015-08-05 09:57:53.449 Got reply 1 to the command 1
. 2015-08-05 09:57:53.449 --------------------------------------------------------------------------
. 2015-08-05 09:57:53.449 Using FTP protocol.
. 2015-08-05 09:57:53.449 Doing startup conversation with host.
> 2015-08-05 09:57:53.512 PWD
< 2015-08-05 09:57:53.528 502 PWD command not implemented, or not allowed.
. 2015-08-05 09:57:53.528 Got reply 4 to the command 16
. 2015-08-05 09:57:53.528 Getting current directory name.
> 2015-08-05 09:57:53.528 PWD
< 2015-08-05 09:57:53.543 502 PWD command not implemented, or not allowed.
. 2015-08-05 09:57:53.543 Got reply 4 to the command 16
* 2015-08-05 09:57:53.543 (ECommand) Error getting name of current remote directory.
* 2015-08-05 09:57:53.543 PWD command not implemented, or not allowed.
. 2015-08-05 09:57:54.980 Getting current directory name.
> 2015-08-05 09:57:54.980 PWD
< 2015-08-05 09:57:54.996 502 PWD command not implemented, or not allowed.
. 2015-08-05 09:57:54.996 Got reply 4 to the command 16
* 2015-08-05 09:57:54.996 (ECommand) Error getting name of current remote directory.
* 2015-08-05 09:57:54.996 PWD command not implemented, or not allowed.
. 2015-08-05 09:57:55.762 Getting current directory name.
> 2015-08-05 09:57:55.762 PWD
< 2015-08-05 09:57:55.777 502 PWD command not implemented, or not allowed.
. 2015-08-05 09:57:55.777 Got reply 4 to the command 16
* 2015-08-05 09:57:55.777 (ECommand) Error getting name of current remote directory.
* 2015-08-05 09:57:55.777 PWD command not implemented, or not allowed.
. 2015-08-05 09:57:56.402 Attempt to close connection due to fatal exception:
* 2015-08-05 09:57:56.402 Internal error fz#list (0010).
. 2015-08-05 09:57:56.402 Got reply 1004 to the command 16
. 2015-08-05 09:57:56.402 LIST with -a failed, will try pure LIST
. 2015-08-05 09:57:56.527 Disconnected from server
. 2015-08-05 09:57:56.590 Connecting to 10.11.20.247 ...
. 2015-08-05 09:57:56.590 Connected with 10.11.20.247. Waiting for welcome message...
< 2015-08-05 09:57:56.590 220 Treck FTP server ready.
> 2015-08-05 09:57:56.590 USER port1
< 2015-08-05 09:57:56.590 331 User name okay, need password.
> 2015-08-05 09:57:56.590 PASS *****
< 2015-08-05 09:57:56.590 230 User logged in, proceed.
> 2015-08-05 09:57:56.590 SYST
< 2015-08-05 09:57:56.605 502 SYST command not implemented, or not allowed.
> 2015-08-05 09:57:56.605 FEAT
< 2015-08-05 09:57:56.621 500 Syntax error, command unrecognized.
. 2015-08-05 09:57:56.652 Connected
. 2015-08-05 09:57:56.652 Got reply 1 to the command 1
. 2015-08-05 09:57:56.652 Doing startup conversation with host.
> 2015-08-05 09:57:56.715 PWD
< 2015-08-05 09:57:56.730 502 PWD command not implemented, or not allowed.
. 2015-08-05 09:57:56.730 Got reply 4 to the command 16
. 2015-08-05 09:57:56.730 Getting current directory name.
> 2015-08-05 09:57:56.730 PWD
< 2015-08-05 09:57:56.746 502 PWD command not implemented, or not allowed.
. 2015-08-05 09:57:56.746 Got reply 4 to the command 16
* 2015-08-05 09:57:56.746 (ECommand) Error getting name of current remote directory.
* 2015-08-05 09:57:56.746 PWD command not implemented, or not allowed.
. 2015-08-05 09:57:57.324 Attempt to close connection due to fatal exception:
* 2015-08-05 09:57:57.324 (ExtException) **PWD command not implemented, or not allowed.**
. 2015-08-05 09:57:57.324 Got reply 1004 to the command 16
. 2015-08-05 09:57:57.324 Connection was lost, asking what to do.
. 2015-08-05 09:57:57.324 Asking user:
. 2015-08-05 09:57:57.324 PWD command not implemented, or not allowed. ()
* 2015-08-05 09:57:58.636 (EFatal) **PWD command not implemented, or not allowed.**
* 2015-08-05 09:57:58.636 Error listing directory ''.
. 2015-08-05 09:57:59.636 Disconnected from server
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License