8

Everything I download will not open. OS X says the file is damaged and can't be opened and should be moved to the Trash. Like Adobe Reader, for PDF documents. JPEG files will not open. Office files will not open. Yet the thumbnail preview is perfect and I can flip the pages to see the information is there. I tried to download OpenOffice for the Office documents but it says the same thing, damaged, cannot open, should be moved to the Trash.

MacBook Air with Mountain Lion

  • from where are you downloading? what is your setting in the Security & Privacy for downloads. How are you connecting to the Internet? – Ruskes Mar 6 '15 at 17:55
  • Welcome to Ask Different! Whilst information about your machine is useful in helping diagnose a problem, please use a title specific and appropriate to the actual problem you are facing so that this question can be found by others. – grg Mar 6 '15 at 18:01
  • To get more information about the problem, open the Console utility and report any messages that appear as you try to open files. Also, open the Terminal utility, enter the command "spctl --assess -vv " (including the space at the end, but not the quotes around it), then drag a downloaded file from the Finder into the Terminal window (this'll paste in the file's path), then reselect the Terminal window and press return. Let us know what it prints. – Gordon Davisson Mar 7 '15 at 19:09
  • @GordonDavisson Indeed it says permission denied. I'm using an iMac from my university and I guess that's why the problem occurred. – xji Sep 11 '15 at 4:05
2
+50

The problem that you are running into is that Gatekeeper is trying to protect you from malware and not only doesn't recognize the developer "signature" of the App you downloaded it "sees" the file was modified by someone/something other than the developer.

Gatekeeper options are found in Apple menu > System Preferences… > Security & Privacy > General tab (El Capitan shown below) under the header "Allow applications downloaded from:"

Security & Privacy Settings

Even with Gatekeeper turned off, if you get the "Damaged App" message, you still won't be able to open the file

App is damaged

Per Apple's Support site:

"Damaged" app. – The app has been altered by something other than the developer. This message will appear no matter the Gatekeeper option chosen.

Making Gatekeeper more friendly....

The solution to this is in the info.plist found inside the app. If you set the following key values in info.plist, the App will revert to an "Unsigned App" and allow you to install it.

<key>CFBundleSignature</key> 
<string>????</string>

Where is the info.plist file located? It's located in the root folder of your App and will be prefaced with the App Name: {My-App-info.plist}

NOTE: You will need a program like TextWrangler (free) to open .plist files or the Property List Editor available in XCode. (My preference is to go with TextWrangler)

Opening the file....

Once you edit that file and save it, you will be able to open it by Control clicking (or right clicking) the App and selecting open.

Unidentified Developer

Standard Disclaimer

Gatekeeper is there to protect your Mac from the malware that's ever increasing on the Internet. You should only use this solution with Apps that you fully trust. If you are just randomly downloading software and using this solution to bypass Gatekeeper, you will end up with a compromised system. So, use at your own risk.

2

I got the same message today as well. This worked for me:

To get around this, temporarily disable Gatekeeper as follows:

  1. open System Preferences and the 'Security & Privacy' options
  2. Click the padlock at the bottom if it is locked
  3. Set 'Allow applications downloaded from:' to 'Anywhere'.
  4. Keep that open, but go back to your finder window
  5. Open JOSM.app it should work this time ...although you still get:

    "JOSM.app" is an application downloaded from the Internet. Are you sure you want to open it? -> Click 'Open'

  6. Now re-enable gatekeeper back in the settings window. Put it back to the default "Mac App Store and identified developers"

I found that on this site - https://help.openstreetmap.org/questions/21301/josmapp-is-damaged-and-cant-be-opened-you-should-move-it-to-the-trash

  • Since it's happening on all files, it's not the same problem described for JOSM.app. On the other hand, it's possible there's a problem with the system's security policy database, and switching gatekeeper off & back on might rebuild the relevant part of that... – Gordon Davisson Mar 7 '15 at 19:05
  • You can also disable Gatekeeper for a single file by right-clicking and choosing "open", rather than needing to change the system-wide setting. – Hawken Rives Apr 23 '16 at 2:50
0

Turn off the "Allow apps only from Mac App Store" in System Preferences.

This seemed to work for me. Yes, I know that it wasn't a .app file, but that didn't seem to matter.

Note: I found this out after the bounty. I still would like to see a better answer, maybe with a cause.

  • Hw does that differ from the other answer? – user151019 Apr 25 '16 at 10:50
  • @Mark he describes it as helping with JOSM.app, I am point out it helps with all downloads. – Riker Apr 25 '16 at 14:13
0

Solution for this is in another thread here: Gatekeeper preventing from opening files from Finder (launching apps is fine)

Short answer: Check /var/db/gkopaque.bundle to see if the file is valid or damaged. In my case this was a zero byte file. Replacing it with a known good copy completely fixed the issue without having to disable Gatekeeper.

You must log in to answer this question.

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