Cyberduck Mountain Duck CLI

Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#4015 closed defect (fixed)

File upload to Akamai NetStorage causes error "SSH_FX_BAD_MESSAGE"

Reported by: graeme@… Owned by: dkocher
Priority: normal Milestone: 3.6
Component: sftp Version: 3.3
Severity: normal Keywords:
Cc: Architecture:
Platform:

Description (last modified by dkocher)

Version: 3.3 (5552)

Connecting to Akamai NetStorage (Akamai Storage in the cloud) via SSH. Can login and browse files successfully. When I drap and drop a file from the Finder in to cyberduck, the upload process connects and then errors out with the following

Bad message (SSH_FX_BAD_MESSAGE: A badly formatted packet or other SFTP protocol incompatibility was detected.).

No information is available in the trace window

Note that I can upload correctly on same machine to same host using Filezilla

Change History (17)

comment:1 Changed 9 years ago by dkocher

  • Component changed from core to sftp
  • Description modified (diff)

comment:2 Changed 9 years ago by paul167

Same issue here, can't upload to akamai over sftp

comment:3 Changed 9 years ago by dkocher

I would need a test account at Akamai to debug this issue.

comment:4 follow-up: Changed 9 years ago by graeme@…

I can take care of this

comment:5 in reply to: ↑ 4 ; follow-up: Changed 9 years ago by dkocher

Replying to graeme@…:

I can take care of this

I have written an email to [ccare@…] about this.

comment:6 in reply to: ↑ 5 ; follow-up: Changed 9 years ago by paul167@…

Replying to dkocher:

Replying to graeme@…:

I can take care of this

I have written an email to [ccare@…] about this.

Anyway I can help out ? I dig cyberduck and this is a feature I could really use. I tried checking out the code but couldn't figure out anyway to debug the Java stuff which seems to be the interesting part. I did manage to upload a file with a simple project that uses Ganymed, so it doesn't seem to be broken in there.

comment:7 in reply to: ↑ 6 ; follow-up: Changed 9 years ago by dkocher

Replying to paul167@…:

Anyway I can help out ? I dig cyberduck and this is a feature I could really use. I tried checking out the code but couldn't figure out anyway to debug the Java stuff which seems to be the interesting part. I did manage to upload a file with a simple project that uses Ganymed, so it doesn't seem to be broken in there.

That is interesting. How does your setup of Ganymed differ from what you can find in SFTPSession?

comment:8 in reply to: ↑ 7 Changed 9 years ago by paul167@…

Replying to dkocher:

That is interesting. How does your setup of Ganymed differ from what you can find in SFTPSession?

Hard to say, my code is only about 10 lines long. All it does is create a connection, do public key auth then create a client and call put() on that client. Is there anyway I can debug the Java code / Instantiate SFTP Session without too much hassle ? There seems to be a buch of dependencies on preferences and so on.

comment:9 Changed 9 years ago by dkocher

Before trying to debug it might also help to look closer at the log. Using defaults in Terminal.app set the logging level of Cyberduck to debug:

defaults write ch.sudo.cyberduck logging debug

comment:10 Changed 9 years ago by dkocher

To debug Cyberduck, build it as usual but copy the file Info.plist.debug to build/Release/Cyberduck.app/Contents/Info.plist. You can then attach the Java remote debugger to port 5005`.

comment:11 Changed 9 years ago by paul167@…

So enabling logging only got me an "Upload failed" trace, but debugging got me a bit further (?). The problem seems to happen in SFTPv3Client.java here. The code expects a type of SSH_FXP_HANDLE but is getting a value of 101, so SSH_FXP_STATUS. I don't know about the protocol so this doesn't help me. Maybe you have an idea / tip ? In the meanwhile I'll try to see how that execution differs from my lightweight test.

comment:12 Changed 9 years ago by paul167@…

It seems that my test only uses SCPClient and never SFTPv3Client, the latter seems to be a more complex implementation (and experimental according to the javadoc).

comment:13 follow-up: Changed 9 years ago by paul167@…

Found the problem! This is it. The remote file is created with read/write permissions (0x3), and akamai apparently only allows write. So If I replace that with 0x2 for write-only, I can upload fine.

My guess is you don't need read-write anyway, if you're creating/truncating a file, why would you read it ? Can we incorporate a fix for the next release ? That'd be great.

comment:14 in reply to: ↑ 13 Changed 9 years ago by dkocher

Replying to paul167@…:

Found the problem! This is it. The remote file is created with read/write permissions (0x3), and akamai apparently only allows write. So If I replace that with 0x2 for write-only, I can upload fine.

My guess is you don't need read-write anyway, if you're creating/truncating a file, why would you read it ? Can we incorporate a fix for the next release ? That'd be great.

I am hesitant to change this as it might break compatiblity with other servers.

comment:15 Changed 9 years ago by Paul <paul167@…>

Any chance we could beta test this? Or find a different way to incorporate this like a bookmark option ?

comment:16 follow-up: Changed 8 years ago by dkocher

  • Milestone set to 3.6
  • Resolution set to fixed
  • Status changed from new to closed

In r6377. Please test with the snapshot build available later today at http://update.cyberduck.ch/nightly/.

comment:17 in reply to: ↑ 16 Changed 8 years ago by paul167

Replying to dkocher:

In r6377. Please test with the snapshot build available later today at http://update.cyberduck.ch/nightly/.

Yep works.

Note: See TracTickets for help on using tickets.
swiss made software