Uploading a file via sftp is silently corrupted if the transfer is interrupted and later resumed
Large files uploaded via sftp from a users compuer to a network file server will sometimes become corrupted. WinSCP reports the transfer as complete so it's difficult for end-users to notice the corruption immediately.
It's only later discovered by other users who download the file and can't unzip the archive.
We performed several tests but we can't get a reliable method to replicate the issue.
Due to WFH, most users are uploading these archives from their home network. Some users have very slow connections so the upload of a file takes several hours.
Our best attempts at replicating this occurs when:
- for some of the users, the network connection drops several times during the transfer but WinSCP recovers and continues the transfer from where it left.
- some users forcefully close WinSCP and restart the application to continue the transfer due to the transfer hanging. This is most likely a good indicator that a file will become corrupted.
Version of WinSCP - 5.17.7
Version of Microsoft Windows - Windows 10 Enterprise 10.0.17763
Transfer protocol - SFTP.
Using the GUI (Commander).
Due to the randomness of this issue, it's difficult to say when the corruption occurs and if it is captured in the logs. We have a log file that's over 1.5GB. If there are specific sections from the log that you are interested in, let me know and I'll extract them.