Some files are being uploaded as 0 bytes when in fact they have content

Advertisement

jwatkin
Joined:
Posts:
4
Location:
Los Angeles, California

Some files are being uploaded as 0 bytes when in fact they have content

I've been successfully uploading files to our CMS vendor's FTP server for years with WinSCP. They've configured a new FTP server for us, which only we are able to use. Each customer gets their own FTP server. Now some of the files that I upload with WinSCP 5.15.9 (build 10071) to this new FTP server are arriving there with 0 bytes when in fact they have content. In a directory with 66 files, two were transferred with zero bytes when they shouldn't have been. When I repeat the transfer, a different couple of files are incorrectly arriving with 0 bytes. It appears to be random.

I'm not seeing any errors or warnings in the WinSCP client GUI during these transfers. This issue was discovered later when our site threw an exception. I've since enabled WinSCP logging. I don't see anything in the log file that stands out, but I'm unfamiliar with these log files.

What sort of validation does WinSCP perform to make sure files are being transferred accurately?

I will try having a colleague replicate the problem with their machine and a different FTP client. If they have the same problem, then I presume the problem is with the vendor's FTP server that they have set up just for us.

Thank you.

Reply with quote

Advertisement

Guest

Re: Some files are being uploaded as 0 bytes when in fact they have content

I had a colleague attempt the same FTP transfer with a different computer, from a different network, using a different FTP client. On his first attempt he also had one file incorrectly transfer with 0 bytes. However on subsequent attempts, he had no files incorrectly transfer with 0 bytes. Even so, given that he had one instance of this error, the problem isn't isolated to WinSCP.

When I tried again with my WinSCP client on my computer, I had a couple of files incorrectly transfer with 0 bytes.

My question still stands though. Is there a way for WinSCP to validate each file transfer byte-for-byte and report any discrepancies?

Thank you.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
37,223
Location:
Prague, Czechia

Re: Some files are being uploaded as 0 bytes when in fact they have content

Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, enable logging, log in to your server and do the operation and only the operation that causes the error. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

jwatkin

Re: Some files are being uploaded as 0 bytes when in fact they have content

After further testing, we believe the problem is with our vendor's new FTP server, configured just for us, and not WinSCP.

Reply with quote

Advertisement

Roopesh
Guest

Do you know what exactly was the issue with SFTP server setup?
We have the exact same scenario wherein some random files are transferred as 0 kb files, but infact they have data.

Reply with quote

jwatkin
Joined:
Posts:
4
Location:
Los Angeles, California

Unfortunately I don't believe we were ever informed of the exact issue with the vendor's FTP server or their network. I'm deliberately including the possibility that it was a network issue on the vendor's end based on vague recollections. We're no longer using that vendor so I can't ask them nor see our old tickets in their tracking system.

I checked my email logs. In addition to erroneously uploading some files as 0 bytes, some files were partially uploaded too, the affected files would contain some data but not all of their data. The latter part of a file's data would be randomly truncated.

Reply with quote

Advertisement

You can post new topics in this forum