Reading Log - SSH_FXP_WRITE

Advertisement

Benjie
Joined:
Posts:
2

Reading Log - SSH_FXP_WRITE

Unfortunately, I have no control on the version used or the client system, but I have a WinSCP 4.1.7 client connecting to an older WinSSHD server and I'm trying to play the middle man and point a finger.

I've got a 7,859,058 file being transferred and I'm trying to understand the WinSCP log

> 2013-10-23 21:11:07.074 Type: SSH_FXP_OPEN, Size: 42, Number: 259
< 2013-10-23 21:11:07.089 Type: SSH_FXP_HANDLE, Size: 11, Number: 259
> 2013-10-23 21:11:07.105 Type: SSH_FXP_WRITE, Size: 4119, Number: 774
. 2013-10-23 21:11:37.214 255 skipped SSH_FXP_WRITE, SSH_FXP_READ, SSH_FXP_DATA and SSH_FXP_STATUS packets.
> 2013-10-23 21:11:37.214 Type: SSH_FXP_CLOSE, Size: 11, Number: 33796
> 2013-10-23 21:11:37.214 Type: SSH_FXP_SETSTAT, Size: 46, Number: 521
< 2013-10-23 21:11:37.261 Type: SSH_FXP_STATUS, Size: 56, Number: 33286
< 2013-10-23 21:11:37.355 Type: SSH_FXP_STATUS, Size: 56, Number: 33542
< 2013-10-23 21:11:37.355 Type: SSH_FXP_STATUS, Size: 56, Number: 33796
< 2013-10-23 21:11:37.355 Status/error code: 0
< 2013-10-23 21:11:37.355 Type: SSH_FXP_STATUS, Size: 56, Number: 521
< 2013-10-23 21:11:37.355 Status/error code: 0

It looks like the client thinks everything went swimmingly, but on the server side, the server said it successfully received all 7,859,057 bytes. No errors, but obviously something went wrong.

Server Log:
Session channel 1: FlowSfsWin: Closed file 'xxxxxxx.xxx'. Registered 129 successful operations. Uploaded 7859057 bytes in 129 operations.

Using the above log, I'm trying to tell if the client attempted to send 7,859,058 bytes or 7,859,057 bytes. No matter how I mangle the numbers, I can't get the size of SSH_FXP_WRITE to tally up anywhere near 7,859,058-ish bytes.

Again, I have little control over anything, so this is about all I got to work with.

Thanks for the help :-)

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
27,253
Location:
Prague, Czechia

Re: Reading Log - SSH_FXP_WRITE

WinSCP does not log size of transferred file. Even if it did, it would log size of the file anyway. It's possible to calculate number of transferred bytes from size of SSH_FXP_WRITE packets. But you need Debug 1 level log file for that. And it's not a trivial calculation.

Anyway, do you use binary transfer mode?
_________________
Martin Prikryl

Reply with quote

Benjie
Joined:
Posts:
2

Re: Reading Log - SSH_FXP_WRITE

martin wrote:

WinSCP does not log size of transferred file. Even if it did, it would log size of the file anyway. It's possible to calculate number of transferred bytes from size of SSH_FXP_WRITE packets. But you need Debug 1 level log file for that. And it's not a trivial calculation.

Anyway, do you use binary transfer mode?

I see "Ascii transfer mode selected" in the log. I should see if I can get them to add "option transfer binary" to the script file?

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,253
Location:
Prague, Czechia

Re: Reading Log - SSH_FXP_WRITE

Benjie wrote:

I see "Ascii transfer mode selected" in the log. I should see if I can get them to add "option transfer binary" to the script file?
Yes, use option transfer binary.
_________________
Martin Prikryl

Reply with quote

Advertisement

You can post new topics in this forum