tomaswolf commented on issue #690: URL: https://github.com/apache/mina-sshd/issues/690#issuecomment-2718258567
Well, then it's clear why that worked: you're not making use of the append flag at all. I suspect this would also work if you didn't pass `SftpClient.OpenMode.Append`. You're writing at the current end of the file, and that's it. So far this is consistent with having a "buggy server that ignores the append flag". You mentioned that with JSch append with that server worked. As far as I see JSch gets the remote file size, and then explicitly sends SSH_FXF_WRITE requests with that as base offset. Apache MINA sshd doesn't do this. SFTP v3 says that the append flag "forces all writes to append data at the end of the file", so the offset should just be ignored. Later drafts for SFTP v4/5/6 are more explicit and state "Data is always written at the end of the file. The offset field of SSH_FXP_WRITE requests is ignored." So: still a buggy server IMO, but there is something we can do to try to work around this server issue. (At the cost of an additional `stat` remote call.) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org