Score:1

Cannot open a zip file with Archive Manager

uz flag

I have been FTPing a database dump from my ISP using Filezilla on an Ubuntu 20.4 VM, running under Windows Hyper-V. I then open the file using Archive Manager and extract it to a folder, ready for Importing into MySQL.

The problem is now that on opening the zip file, I get an error:

An error has occurred while loading the archive

I have also noticed that uploading file to my web site, they arrive with a Zero byte file length.

So with all this in mind, looks like there is a problem with Filezilla, OR a network issue between Ubuntu and Hyper-V??

Any thoughts please.

Score:7
in flag

The first things I would check would be:

  1. Are any errors visible during the file transfer from the ISP? If I understand correctly, the file has zero bytes after the archive is later uploaded to a third host. Does the file being opened with Archive Manager have the same size as on the ISP?
  2. Is the file a proper archive? Running file [filename] could also indicate if the file was not transferred correctly. (ref: man page for file). This could tell if by chance the dump was done as text rather than a compressed file- database dumps are often a whole lot of SQL.
  3. If not, what did get transferred? It's possible FileZilla transferred it in ASCII mode instead of Binary, which could corrupt it. By default it's set to auto-detect, but there is a manual setting option. More about file types available here
  4. If it's a proper archive, can a file listing be retrieved with unzip -l file.zip?
  5. Another thought: one cause for zero byte files is a full disk. Make sure both the Windows and Ubuntu disks/partitions have plenty of space.
George avatar
uz flag
HA! Running point 4 gives this error: error [filename] : missing 24 bytes in zipfile (attempting to process anyway) Says it did extract the file, but it appears nowhere?
mkazin avatar
in flag
Oh that's a strange-sounding error. Is there more information in the output? Googling that error I got several mentions of this: `(please check that you have transferred or created the zipfile in the appropriate BINARY mode and that you have compiled UnZip properly).` That is exactly what point 3 was guessing might have happened.
Score:0
uz flag

Yes - that's exactly what happened; file transferred in ASCII. Switched to binary and all seems fine now. Thank you for all the replies.

PS. One would expect the message to be more explicit.

andrew.46 avatar
in flag
Rather than create your own answer (and accept it) from the given answer of mkazin consider accepting mkazin's answer and deleting this one...
Bilbo Baggins avatar
br flag
This should be a comment under @mkazin's answer and you should accept their answer.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.