The message “You do not have permission to open the application” is shown when trying to open a downloaded app

apple.stackexchange https://apple.stackexchange.com/questions/408752

Question

This seems to be a new issue with Big Sur.

I have "App Store and identified developers" enabled in Security & Privacy, but I've run into a certain app outside the App Store that seems like it doesn't fall under the category of "identified developers".

When I try to open the app, it tells me "You do not have permission to open the application". Going into Terminal, however, I can see executable permissions are enabled for the app, just like for every other app.

What can I do to be able to open the app?

Was it helpful?

Solution

In playing with the Triangulator app I found the following issues on Big Sur:

  1. When decompressing the .zip, the application contents didn't retain the execute bits. Add it back with sudo chmod -R 755 /path/to/app.
  2. Since the application was downloaded by a web browser (in my case) the quarantine bits are set on the decompressed files. Remove that with sudo xattr -dr com.apple.quarantine /path/to/app.

Once those issues are remediated then the application can be launched.

-Eric

OTHER TIPS

Good News / Bad News

Good news: I figured out how to solve the problem for my apps. (Spoiler Alert: The answer for me is: “Open in Rosetta”.)

Bad news: The same solution probably won’t work for everyone, if for no other reason than I believe people are seeing this on Intel Macs.

To recap:

Here is the error message that I was getting when I tried to open either of the two apps in ~/Library/Printers/:

You do not have permission to open the application

Trying something like this:

open ~/Library/Printers/Brother\ HL-2270DW\ series.app

would lead to this error:

The application cannot be opened for an unexpected reason, 
error=Error Domain=NSOSStatusErrorDomain Code=-10826 
"kLSNoLaunchPermissionErr: User doesn't have permission to launch the app 
(managed networks)" UserInfo={_LSFunction=_LSLaunchWithRunningboard, 
_LSLine=2508, NSUnderlyingError=0x7fa98a43e450 
{Error Domain=RBSRequestErrorDomain Code=5 "Launched process exited during launch." 
UserInfo={NSLocalizedFailureReason=Launched process exited during launch.}}}

which was not at all helpful.

  1. `open -a 'Brother HL-2270DW series' did not work.

  2. Trying to remove the quarantine flag didn't work

  3. There were no files that were not executable but should have been

  4. Right Click » Open did not prompt me to open it at all.

What fixed it

Setting these apps to “Open in Rosetta” immediately solved the issue.

Get Info » Open in Rosetta

I don’t know why.

Some further thoughts on how I got into this mess…

Needed Official Drivers from Brother

When I tried to install the printer, macOS was going to install it as a generic printer. I didn't want that, so I went to the Brother website and found the official Brother Downloads page for the HL-2270DW.

Now, that page only mentions compatibility with macOS 10.15, and I'm using Big Sur, but I guessed that it would work and probably just had not been updated for Big Sur yet because some companies take forever to do that.

“Did I install this .pkg using Rosetta? Does it matter?”

I use iTerm as my default terminal app, and I have it set to always open using Rosetta, which was recommended for making brew work with Big Sur on M1 macs.

As a result, anything that I do while using iTerm is done as if this is an Intel Mac.

Here’s the weird part: Lots of times when I run into a .pkg that I need to install, I have a shell script that runs sudo /usr/sbin/installer with the proper parameters. So chances are good that I installed the Brother drivers with that script.

In iTerm.

Running in Rosetta.

Does that matter? I really have no idea. It’s entirely possible that I could have installed this with the regular Installer.app and had the same experience. But the fact that I had to manually set the printer apps to run under Rosetta makes me at least wonder if that would have been true even if the Installer app had been running as an Apple Silicon process.

Conclusion: I should probably test that. I should also probably stop using my pkg installer shell script in iTerm (I might be able to use it in Terminal.app which I left to run as an Apple Silicon process).

Pro-Tip: Get Suspicious Package and set it as the default app for all .pkg files. It’s free and it’s fantastic.

One “Trick” that I used to help solve this…

I launched the app via lldb like so:

lldb ~/Library/Printers/Brother\ HL-2270DW\ series.app/Contents/MacOS/PrinterProxy

Once it was ready, I typed run and it worked. That’s what first tipped me off that “Open Using Rosetta” might solve it, once I remembered that iTerm was running under Rosetta which means that lldb was running as an Intel process.

Have an M1 Mac? Now you have another troubleshooting step to try.

Might take a while to get this one to soak in (at least for me), but clearly “Have you tried running it under Rosetta?” is another question we should ask ourselves/others when trying to diagnose issues on M1-based Macs.

This is a known, not fully resolved problem with some apps, probably older apps which haven't been updated for Big Sur.

Here are some other things you can try in addition to the answers already given.

1. Set permissions not only for the app bundle but for all files contained within (you may have done this but it's not clear from what's been said so far):

Using Terminal, enter the following, with the trailing space

sudo chmod -R 755 

and then drag the app bundle onto the Terminal window, press enter, and enter your password if asked.

2. Using Terminal, install upx with brew:

If you don't have Homebrew installed, you can first install it with

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Then run brew install upx

Then run this command, substituting the path of your app's executable for the part after sudo upx -d , and enter your password if asked:

sudo upx -d /Applications/my_app.app/Contents/MacOS/my_app

To open an app bundle to find the executable, right click it in the Finder and click 'Show Package Contents'.

3. Contact the app developer to ask for any support they can give, or an updated version of the app.

This may well be all you can do at this stage, except for downgrading your Mac back to Catalina.

Remove the ‘quarantine’ attribute from the file via:

sudo xattr -d com.apple.quarantine *FILENAME*

That should fix it.

F.

I may have a solution. Check to see if you have two (or more) Application folders. You should only have one at the top level of your disk. Click on your hard drive and your should see your main Applications Folder (as well as Library, System and Users). If you Open Users, your username and see an Applications folder there with the problematic apps, you have found your problem. Move your apps to the Main Application folder or reinstall into that folder. You may have to Boot into Restore mode, launch Terminal and run repairHomePermissions (case sensitive) to get the installs to go into the right place.

Licensed under: CC-BY-SA with attribution
Not affiliated with apple.stackexchange
scroll top