lavv17 / lftp

sophisticated command line file transfer program (ftp, http, sftp, fish, torrent)
http://lftp.yar.ru
GNU General Public License v3.0
1.11k stars 162 forks source link

Can't upload 0 byte files #465

Closed iSecret2048 closed 6 years ago

iSecret2048 commented 6 years ago

Hi everyone, before I begin I'd like to explain my setup:

I have a VPS (Debian 9), which has a ProFTPD server installed (ProFTPD Version 1.3.5b) and OpenVPN for tunneling. The ProFTPD server works fine, due to security reasons TLS is enforced on it. The certificate on the server is self-signed.

My client (Raspberry Pi 3 model B) has Raspbian 9 installed on it. It's connected to the remote server (VPS) via an OpenVPN connection. The RPi also provides bridging for me via the VPN, between my home network and my PC, wherever it may be.

One day I was restoring a backup from my home NAS drive to the remote server via RPi and I've noticed that the file uploading got stuck and the process had to be aborted. I've retried the process over and over and it got stuck at the same place. I've started investigating the issue and got to the point, that every file which had 0 bytes in size, simply was uploading forever. The upload process starts and gets stuck when lftp starts to read a 0 byte file and it stays there until it's manually aborted. The uploading process automatically restarts itself, when it reaches the specified time limits, but nothing moves from point A to point B.

I've searched the web for some answers, but many issues I found were pointing back to an SSL handshake, which currently is not the case. I can move files freely between my server and client, even though the certificate is ignored because it's self-signed, but every file over 0 bytes can be moved without any errors. Even directories can be created, deleted and renamed.

I've found some issues from the past: https://github.com/lavv17/lftp/issues/420 and https://github.com/lavv17/lftp/issues/377, but it seems to me, that it's a recurring problem and it's still not been resolved.

The problem couldn't be with the server, because other FTP clients, like Total Commander don't have problems uploading a 0 byte file.

There are many examples, when 0 byte files come handy for various developers, like:

It would be great if this issue could be finally resolved, because there aren't many clients which support the FTPS protocol. Switching over to another FTPS client or another file transport method is not an answer.

lavv17 commented 6 years ago

Should be fixed in 4.8.4, please test.

iSecret2048 commented 6 years ago

It works fine, tests were successful! :+1:

It was quite painful to install lftp from source on a Raspbian 9. I had to install all the necessary packages required for the program. Even those which were not mentioned in the ReadMe.md file, but were required for a successful compilation. In the end, it was a success and it works as expected! :+1:

Thank you!