Topic "Problem copying directories using sftp"

Author Message
guest

Guest


Hello!

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.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
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 Sad
_________________
Martin Prikryl
guest

Guest


The problem has now been reported to the OpenSSH mailing list as well.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
Let me know if they reply anything.
_________________
Martin Prikryl
guest

Guest


Now I've tried with WinSCP 3.7.1. The problem seems to have been solved with this version. At least I just sucessfully copied a directory recursively to the server that had the problem.

There has been no solution from the OpenSSH-list.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
guest wrote:
Now I've tried with WinSCP 3.7.1. The problem seems to have been solved with this version. At least I just sucessfully copied a directory recursively to the server that had the problem.

There has been no solution from the OpenSSH-list.

Something must have changed on the server as I have fixed WinSCP to display correct error message only.
_________________
Martin Prikryl
setatakahashi
[View user's profile]

Joined: 2007-02-05
Posts: 1
Location: So Paulo, SP - Brazil
prikryl wrote:
guest wrote:
Now I've tried with WinSCP 3.7.1. The problem seems to have been solved with this version. At least I just sucessfully copied a directory recursively to the server that had the problem.

There has been no solution from the OpenSSH-list.

Something must have changed on the server as I have fixed WinSCP to display correct error message only.


The problem "Received SSH_FXP_NAME packet with zero or multiple records" was manifested here and here what I did to solve it.

First I login to the machine with the ssh and use a regular user (root doesn't count).
I entered the directory where the error is ocurring and listed it using ls -la. Check the current directory and up one level (. and ..). If it appear as ./.. Permission denied, do the follwoing:
1. force the filesystem to umount(umount -f /filesystem).
2. Check the permissions of the mount point.
3. Mount it.

I think this error is due to a chown command while the directory was being used by any PID.

This problem manifested while using WinSCP. FileZilla wasn't presenting this behavior.
_________________
--
Emerson Seiti Takahashi
So Paulo, SP - Brazil
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