Zip files transferred as Ascii are corrupted when trying to extract them on cpanel server

Sunlander

Well-Known Member
May 7, 2018
49
4
8
UK
cPanel Access Level
Root Administrator
Hi,

I receive zip files via FTP and cpanel corrupts them when they are opened. I believe the reason is that the file is transferred as Ascii type (binary ones open fine). Unfortunately I can't get the source to change the transfer to binary as the file goes to multiple sites (all as Ascii) so they cannot change just for me.

Is there a setting/plugin or component in cpanel that would allow ascii files to open properly? When I open the file in Cpanel it produces the following errors:


error [/home/mysite/public_html/media/zips/myzippedfile.zip]: missing 26 bytes in zipfile
(attempting to process anyway)
error [/home/mysite/public_html/media/zips/myzippedfile.zip]: attempt to seek before beginning of zipfile
(please check that you have transferred or created the zipfile in the
appropriate BINARY mode and that you have compiled UnZip properly)
(attempting to re-compensate)
inflating: myfile.BLM bad CRC 841e0aa0 (should be 928647f5)

Any help/guidance would be most appreciated as I have never experienced this before.

Kind regards
 

quietFinn

Well-Known Member
Feb 4, 2006
1,222
87
178
Finland
cPanel Access Level
Root Administrator
Hi,

I receive zip files via FTP and cpanel corrupts them when they are opened. ...
cPanel doesn't corrupt the file, it's already corrupted when it's transferred using ascii mode transfer.
 
  • Like
Reactions: cPanelLauren

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,252
313
Houston
This isn't something that cPanel wouldn't be able to control here. The issue isn't cPanel corrupting the file as @quietFinn noted already the issue is the method you're using to transport them. Zip files should not be transferred in ASCII Mode and most FTP programs allow the use of Auto to automatically detect which method to utilize.