Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)


Topic review


Hi Martin,

Unfortunately, I can't recreate my issue today. Very odd. I looked at historical files, which run every Tuesday, and it still had the issue last time, but it seems fine now. Maybe afts can recreate?

Anyway, thanks for your attention, and I'll update if it comes back.

OK, can you please repeat the test with logging set to Debug 1? If you succeed, please try again with Debug 2. If you succeed with both, please post both log files. It's enough to reproduce the problem with one file (e.g. the PDF).

Thanks for the details, I'll look into it in few days.

Don't think this is limited to pdf files, as I'm having trouble downloading csv files. I've never seen this happen -- this issue started last week. Also, it's only with a certain server. When I test using my own server, I don't have any issues.

I attached my original and downloaded files. Issues start at line 5873. Basically, the chunk from a few lines up repeats itself. Then there's a line break, then the file resumes. But the issue happens a few times in the course of the file. I attached zips of the files (although they were transferred as .csv, using binary mode) and the log. I removed some information from the log, but if you want the original I can private message it.

Other SFTP clients d/l these files correctly.

Hopefully this helps -- let me know if you need any other info. Thank you.


I didn't realized I was not logged in until after sending. This is why I'm a guest. Also one of the zip files was public accessible and I would prefer it was not. Can you fix this or delete it from the forum. Sorry, I don't see how to do this myself.

The log though is here again as a not private file.


Last two sample files - private though.

Plus log file.

Here are some examples of the SFTP problem


I was able to duplicate the problem today and am attaching the following items:

PP_Image_001.jpg shows the byte sizes from two files, both before being sent via the SFTP process and after. The PDF file was created from your website. The zip file contains some DBF data that does not contain any confidential information, but that said, I would like you to delete this when done with it.

There is a log file of the transmission. The resulting (downloaded) files I renamed only so they would not be confused with the source files.

When you try to open the WinSCP_Test.pdf file it opens fine. Try that though with the (aftersending) version and it fails. Not surprising given the byte size difference.

Same story with the zipped DBF file. I will send that in another post due to limits.

Thanks for your help.

Martin, thanks for the reply. I will provide the details in about a week when back from holidays.

Re: PDF files corrupted with SFTP when Binary Mode is enabled

Please focus on one protocol for now. For example on SFTP.
Post a verbose log file, and tell us what size did you expect and what size did you get. Can we get a copy of a file before and after transfer? Can you post a verbose log file of FileZilla and Smart FTP too?

More info

We downloaded this client to test SFTP today:

The PDF files work perfectly when moved using their tool The byte sizes match the source and the PDF files open without errors.

We have also confirmed FileZilla works correctly also.

We need help working out why SFTP with PDF files at least fail using the current version of WinSCP.

We have also now tested this using ZIP and TXT files, and the same problem exists. The transferred file has different byte sizes than the source file.

PDF files corrupted with SFTP when Binary Mode is enabled

We are having issues where PDF files that are being transferred end up with different byte sizes than the source file after the transfer to a remote computer. We have confirmed that Binary is enabled, I'm 99% sure.

When we change to FTPS it seems to work though. Yet when we change to FTP basic we get failures...

We are using the GUI and the Command interface.