Bug 307433

Summary: sftp file upload not working with sshdroid
Product: [Frameworks and Libraries] kio-extras Reporter: Fabian <fabian>
Component: SFTPAssignee: Andreas Schneider <asn>
Status: RESOLVED WORKSFORME    
Severity: normal CC: kinnalru, sitter
Priority: NOR    
Version First Reported In: 18.04.3   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: kio_ftp.log

Description Fabian 2012-09-26 11:59:25 UTC
While sftp upload from the command line works, I can't upload any file to the android device with the sftp kio slave.

Directory browsing and download works so.
Comment 1 Andreas Schneider 2012-09-26 12:51:04 UTC
Created attachment 74181 [details]
kio_ftp.log

Can you send me log from kio_sftp and also froth the ssh server you're using?


http://techbase.kde.org/Development/Tutorials/Debugging/Debugging_IOSlaves/Debugging_kio_sftp
Comment 2 Fabian 2012-09-26 13:19:22 UTC
Am Mittwoch, 26. September 2012, 12:51:04 schrieben Sie:
> https://bugs.kde.org/show_bug.cgi?id=307433
> 
> --- Comment #1 from Andreas Schneider <asn@cryptomilk.org> ---
> Can you send me log from kio_sftp and also froth the ssh server you're
> using?
> 
> 
> http://techbase.kde.org/Development/Tutorials/Debugging/Debugging_IOSlaves/D
> ebugging_kio_sftp

The logfile of the ssh server shows nothing.
Comment 3 Samoilenko Yuri 2014-01-12 20:41:00 UTC
Same issu when dealing with apache-sshd server.  Failed after creating fiel and trying to upload some data with internal libssh error: "Short sftp packet!".

Detailed log:
kio_sftp(14061) sftpProtocol::copy: KUrl("file:///home/MVI_0863.MOV")  ->  KUrl("sftp://kdeconnect@192.168.1.102:1739/mnt/sdcard/MVI_0863.MOV")  , permissions =  "292" , overwrite =  QFlags() , resume =  QFlags()
kio_sftp(14061) sftpProtocol::sftpCopyPut: "/home/MVI_0863.MOV" -> KUrl("sftp://kdeconnect@192.168.1.102:1739/mnt/sdcard/MVI_0863.MOV") , permissions= 292 , flags QFlags()
kio_sftp(14061) sftpProtocol::sftpPut: KUrl("sftp://kdeconnect@192.168.1.102:1739/mnt/sdcard/MVI_0863.MOV") , permissions = 292 , overwrite = QFlags() , resume = QFlags()
kio_sftp(14061) sftpProtocol::sftpLogin: connected ? true username: old= "kdeconnect" new= "kdeconnect"
kio_sftp(14061) sftpProtocol::log_callback: [ 1 ]  channel_write wrote 37 bytes
kio_sftp(14061) sftpProtocol::log_callback: [ 1 ]  placing 45 bytes into channel buffer (stderr=0)
kio_sftp(14061) sftpProtocol::log_callback: [ 1 ]  Error : SFTP server: /mnt/sdcard/MVI_0863.MOV
kio_sftp(14061) sftpProtocol::log_callback: [ 1 ]  channel_write wrote 42 bytes
kio_sftp(14061) sftpProtocol::log_callback: [ 1 ]  placing 33 bytes into channel buffer (stderr=0)
kio_sftp(14061) sftpProtocol::log_callback: [ 1 ]  Flags: 0000000d
kio_sftp(14061) sftpProtocol::log_callback: [ 1 ]  Size: 0
kio_sftp(14061) sftpProtocol::sftpPut: Appending .part extension to "/mnt/sdcard/MVI_0863.MOV"
kio_sftp(14061) sftpProtocol::sftpPut: Deleting partial file "/mnt/sdcard/MVI_0863.MOV.part"
kio_sftp(14061) sftpProtocol::log_callback: [ 1 ]  channel_write wrote 42 bytes
kio_sftp(14061) sftpProtocol::log_callback: [ 1 ]  placing 21 bytes into channel buffer (stderr=0)
kio_sftp(14061) sftpProtocol::sftpPut: Trying to open: "/mnt/sdcard/MVI_0863.MOV.part" , mode= "420"
kio_sftp(14061) sftpProtocol::log_callback: [ 1 ]  channel_write wrote 54 bytes
kio_sftp(14061) sftpProtocol::log_callback: [ 1 ]  placing 49 bytes into channel buffer (stderr=0)
kio_sftp(14061) sftpProtocol::log_callback: [ 1 ]  channel_write wrote 32758 bytes
kio_sftp(14061) sftpProtocol::log_callback: [ 1 ]  channel_write wrote 28743 bytes
kio_sftp(14061) sftpProtocol::log_callback: [ 1 ]  Error : Short sftp packet!
kio_sftp(14061) sftpProtocol::sftpPut: Error during 'put'. Aborting.
Comment 4 Andreas Schneider 2014-01-13 13:06:16 UTC
Looks like the server send bogus data.

if (buffer_get_u32(packet->payload, &size) != sizeof(uint32_t)) {
     ssh_set_error(sftp->session, SSH_FATAL, "Short sftp packet!");

The first value needs to be the size of the packet as uint32. This is a packet error, the server sent a wrong packet ...
Comment 5 Andreas Schneider 2018-09-03 06:03:15 UTC
Which app provides an sftp server on android?
Comment 6 Harald Sitter 2020-10-15 10:37:12 UTC
Is this still a problem?
Comment 7 Bug Janitor Service 2020-10-30 04:33:25 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 8 Bug Janitor Service 2020-11-14 04:34:02 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!