22

Mac OS. I am unable to expand zip file. I have tried this: Unzip in Terminal:

  1. Open Terminal.
  2. Type unzip and a space, then drag/drop the zip file into the Terminal window.
  3. Press Enter and the zip file will be unzipped, storing all files on your computer.

When I try to open the zip file, it reads:

unable to expand (error 1- operation not permitted).

Online, p7zip seems to be recommended. Here are instructions:

You can install it via MacPorts or Homebrew with these commands, respectively:

sudo port install p7zip
brew install p7zip

Then, to unzip it, use:

7za x file.zip

Please explain the steps to enter this code, I don’t know what it means. But I am glad to learn a new thing!

1
  • 2
    You get the error 1-operation not permitted when you double click the .zip file in Finder? – DrZoo Nov 18 '16 at 0:16

11 Answers 11

23

The Mac Archive Utility doesn't allow you to unzip large files, use the command line.

unzip file.zip
1
  • 1
    Not even large(20kb with 2 files), it's just broken still in 2021. The Unarchiver does this just right. – Dmitriy Pavlukhin Feb 24 at 11:41
10

I get a similar error with a zip file containing a very large file (5.5GB uncompressed). The error comes when I double-click on the file in the finder. That launches the MacOS Archive Utility, which is what gives the error. In my case it happens after it does the decompression, which takes quite a while.

Unable to expand "zip_file_name_here.zip" into "destination_folder_here".
(Error 1 - Operation not permitted.)

As it turned out, the uncompressed files were hidden away in a temporary directory, and they were fine, so it's some sort of sandbox error or something.

The easy solution for me: Download Stuffit Expander from the Mac App Store. It was able to deal with the file just fine.

1
  • 5
    Stuffit Expander in MAC helped me unzip the file properly without any error. You can download it from App Store. – Amit Thawait Jul 22 '18 at 7:48
4

I tried using Archive Utility but it was throwing the same error. Wasn't able to expand my file. I used another application (The Unarchiver) which is also free in Appstore. It works fine for me.

2

Sounds like you either don't have read permission on the zip file itself or write permission on the directory that is is contained in, which is where unzip is trying to create the files extracted.

2

just change the extension of the file to .RAR and expand it. It should uncompress the file without any problem. This error usually happens when a compression operation of a large folder is interrupted.

1

I had the same issue with a password protected .zip which may have something to do with it. I was able to open it with Keka but you can probably use any decent file archive tool / unzipper on the app store.

1

You can use The Unarchiver. Worked for me for a zip file generated with zip -r folder.zip folder on a Linux Machine.

0

had the same problem used the following command to unzip it:

ditto -V -x -k --sequesterRsrc --rsrc FILENAME.ZIP DESTINATIONDIRECTORY

found this solution here

0

The issue for me was that I had zipped the files at a relative location with double dots i.e. I'd run zip -r zipfile_name.zip ../relative/path/to/folder. Recreating the zip but using an absolute path solved my problem e.g. zip -r zipfile_name.zip /absolute/path/to/the/same/folder.

0
unzip file.zip

works but where do the files go? They are in users/your_user_name/ Unless you cd first to another directory. To get the path to file.zip just drag it into the terminal window. Stuffit Expander also worked for me.

1
  • This does not answer the question properly, needs to be more complete. – Razetime Oct 20 '20 at 3:52
0

I got this problem, when I was sent .zip from another macos computer. For some reason Macos includes hidden _MACOSX folder with duplicated hidden meta files. When I cleared this folder from archive with help of Winrar, it unarchived normally.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.