PDF files corrupted with SFTP when Binary Mode is enabled

Advertisement

afts
Joined:
Posts:
7
Location:
Seattle

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.
  • WinSCP_AvalTelco.log (41.19 KB, Private file)
Description: Here is some log data for several sessions.

Reply with quote

Advertisement

afts
Joined:
Posts:
7
Location:
Seattle

More info

We downloaded this client to test SFTP today: https://www.smartftp.com

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.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,468
Location:
Prague, Czechia

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?

Reply with quote

Guest

Here are some examples of the SFTP problem

Martin,

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.

PP_Image 001.jpg

Reply with quote

Advertisement

Guest

Last two sample files - private though.

Plus log file.
  • sftp_testing.log (46.71 KB, Private file)
  • LargeTestFile_(aftersending).zip (1.8 MB, Private file)
  • LargeTestFile.zip (1.8 MB, Private file)

Reply with quote

afts
Joined:
Posts:
7
Location:
Seattle

Martin,

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.

Rick

Reply with quote

sidjmt88
Joined:
Posts:
2

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.
  • sftptest.zip (519.46 KB, Private file)

Reply with quote

Advertisement

martin
Site Admin
martin avatar

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).

Reply with quote

sidjmt88
Joined:
Posts:
2

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.

Reply with quote

Advertisement

You can post new topics in this forum