I zipped the public folder inside a shared hosting file system, using the command:

zip -r file.zip ../public

and it created a file.zip in the private directory.

I then downloaded the file.zip and using FTP copied it into another site using the same file structure and tried to unzip it.

The unzipping won't work, it gives a message skipping insecure entry for every file.

What is the cause of this and how do I successfully unzip the files?

  • The so-called insecure entries all start with “..”, is that right?
    – dhag
    Oct 6, 2017 at 22:59
  • yes. They all start with "../public/"
    – Osama
    Oct 7, 2017 at 2:10

2 Answers 2


The only option in the man page I see that might allow this is -^. You should have created the zip with zip -r private/file.zip public from the parent directory directory, instead of from the private directory.


zip is skipping all entries in the archive because extracting them would write to the parent directory.

The zip utility stores the file path along with the file content in the archives that it creates, and you archived files in ...

Unpacking the archive is considered "unsafe" as it may have unwanted or surprising consequences.

Create the archive again, but this time from the parent directory of the directory that you are archiving.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .