Problem copying directories using sftp

Bernt Guldbrandtsen bg at genetics.agrsci.dk
Thu Oct 28 18:31:56 EST 2004


Hello!

A couple of days ago I submitted the problem report shown below to the 
support forum for WinSCP.

I got a reply (shown at the end of this e-mail) saying that this in part 
was a WinSCP problem, but also that there appeared to be something wrong 
with the replies from OpenSSH-3.9p1 under AIX 4.3.3.

The full dialog including the reply can be seen at

	http://winscp.sourceforge.net/forum/viewtopic.php?t=1624

Best regards,

Bernt Guldbrandtsen
-------------------------------------8<----------------------------------

Copying directories recursively to our AIX-4.3.3 host with sftp 
consistently fails with an error relating to SSH_FXP_NAME (see below in the 
log).

This happens with both WinSCP 3.6.8 and 3.7.0 beta dated 2004-10-12 with 
both the Norton and the Explorer interface. The problem does not occur 
using SCP as the protocol. The problem occurs from several client machines.

The server uses the SSH protocol version 2 with aes encryption and 
compression. The file transer protocol is SFTP(v3). The AIX-box runs 
OpenSSH-3.9p1.

The problem does not occur using a RedHat Linux 9.0 box, i.e. this does not 
HAVE to be a WinSCP problem. However, creating directories on the AIX 
machine using Cygwin sftp works fine.

I hope somebody can help with this.

Best regards,

Bernt Guldbrandtsen

The log file says:

. Startup conversation with host finished.
. Copying 1 files/directories to remote directory "/h580/avl/bg/"
. PrTime: Yes; PrRO: Yes; Rght: rw-r--r--; PrR: No; FnCs: N; RIC: Yes; Resume:
S (102400); CalcS: Yes; Mask: *.*
. TM: M; ExclM:
. AscM: *.*html; *.htm; *.txt; *.php*; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *
.tex; *.pl; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml
. File: "C:\Documents and Settings\bgu\Dokumenter\pdf"
. Trying to open directory "/h580/avl/bg/pdf/".
 > Type: SSH_FXP_OPENDIR, Size: 27, Number: 2571
< Type: SSH_FXP_STATUS, Size: 29, Number: 2571
< Status/error code: 2, Message: 2571, Server: No such file, Language:
. Creating directory "/h580/avl/bg/pdf/".
. Canonifying: "/h580/avl/bg/pdf/"
. Getting real path for '/h580/avl/bg/pdf/'
 > Type: SSH_FXP_REALPATH, Size: 28, Number: 3088
< Type: SSH_FXP_STATUS, Size: 24, Number: 3088
< Status/error code: 0
. Attempt to close connection due to fatal exception:
* Received SSH_FXP_NAME packet with zero or multiple records.
. Closing connection.

-------------------------------------8<----------------------------

There is definitely bug in WinSCP handling the response to SSH_FXP_REALPATH 
request. The error it displays is non-sense.

However there seems to be greater bug on your server side. To 
SSH_FXP_REALPATH request the server must reply either SSH_FXP_NAME or, when 
error occures, with SSH_FXP_STATUS with reason of the failure. Your server 
replies SSH_FXP_STATUS with status "OK". It does not make sense and 
probably it violates the SFTP protocol specification.

I do not know how to solve this

---------------------------------------------------------------------




More information about the openssh-unix-dev mailing list