160

I installed macOS v11 (Big Sur) yesterday and since then I am not able to run some old application. This is the message I get:

You do not have permission to open the application

I think this application is from an unknown developer.

I tried different methods that were working in macOS v10.15 (Catalina) like:

spctl --master-disable

Or I tried also to disable SIP and AMFI.

I've also tried:

sudo xattr -rd com.apple.quarantine /Applications/my_app.app

If I run the application from the terminal, this is the text version of the error I get:

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=0x7fcb24c13ec0 {Error Domain=RBSRequestErrorDomain Code=5 "Launched process exited during launch." UserInfo={NSLocalizedFailureReason=Launched process exited during launch.}}}

Also tried to disable encryption and run:

csrutil authenticated-root disable

This is the error window:

Enter image description here

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
DeejonZ
  • 2,451
  • 2
  • 17
  • 19
  • please share some of the applications you're trying to run without success... – DeejonZ Nov 23 '20 at 12:09
  • 7
    if you downloaded by browser your big sur sent for quarantine, for disable run: `sudo xattr -dr com.apple.quarantine /path/to/app` and then open your app normally, I hope this solve your problem – Damon Abdiel Dec 31 '20 at 16:37
  • This works for me – Krushna Jan 19 '22 at 15:11
  • For all the solutions using `codesign`, check @eskimo's answer here: [You do not have permission to open the application “Eclipse”.](https://developer.apple.com/forums/thread/684509?answerId=682326022#682326022) – Ricardo Jan 24 '22 at 22:30
  • It appears, If you are logged in as a guest user, Download and open an app. – Anurag Sharma Feb 01 '22 at 12:51

11 Answers11

197

I had this problem with the error "Termination Reason: Namespace CODESIGNING, Code 0x1" and I managed to open the application after I signed it again on that machine, with the command:

codesign --force --deep --sign - /Applications/AppName.app

No other solution worked for me.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
AlinNereid
  • 1,979
  • 2
  • 3
  • 2
  • 15
    This is the only thing that worked for me. All the other answers assume it's actually a permissions thing but it's an issue with Big Sur not allowing unsigned applications from being run (even with that option turned on in system preferences). – hsnee Dec 05 '20 at 23:43
  • 3
    This should be the accepted answer. It's the only thing that worked for me, too. – cstrouse Dec 09 '20 at 09:29
  • This worked for me with a Catalyst app (debug) built using Xcode. The `upx` method didn't work. – The_Lucifer Dec 17 '20 at 18:15
  • This solution doesn't work for me, only the upx method did. – DeejonZ Jan 02 '21 at 10:34
  • This worked for me, since it was due to something wrong with the signing. From syslog: `(application.tw.com.sparkring.ImageScan.76131053.76131065[38693]): Binary is improperly signed`. At the same time, need to be sure the app came from a good source, to avoid becoming a malware vector. – Andre M Jan 26 '21 at 11:48
  • 1
    This worked for me too. But I want to share my unsigned .app file with others then what need to do in that case. Anyone can suggest something regarding this. Thanks @AlinNereid. – Ravindra Kumar Sonkar Mar 05 '21 at 11:43
  • I wanted to test my own macOS app (created on a non-silicon mac with macOS 10.15) on my wifes macbook pro with macOS Big Sur and got the error. This solution worked immediately for me. – qpwr Apr 01 '21 at 12:40
  • Yeah, in my case the termination reason was the same namespace CODESIGNING and this fixed my issue – Rohith V Jul 12 '21 at 11:24
  • Thanks a lot This is the only scenario that worked for me with Spring Tool Suite 4 nightly build for M1. – Mike Sep 26 '21 at 05:53
  • 1
    Phew! After trying every workaround posted on the internet, this one finally worked. Please Apple, don't break working apps. – chhantyal Sep 29 '21 at 08:35
  • Thanks for this! In my case I needed to prepend this with `sudo` having installed an app with nix that required signing. – ldeck Oct 06 '21 at 00:19
  • This also worked for me while installing Papyrus on macOS Big Sur. No need for any chmod 755. – Alper Kocatas Oct 17 '21 at 19:13
  • This worked for me as well. All the other with permissions didn't. Big Sur 11.6 – bogdan.rusu Oct 29 '21 at 12:33
  • 7
    This should be the accepted answer. It worked for me on DBeaver app – Bharath Ram Nov 09 '21 at 05:28
  • works like charm. macOS BigSur, app= DBeaver – Maor Barazani Jan 03 '22 at 21:37
  • I didn't have the same error message but this still worked for me. – Clafouti Feb 16 '22 at 16:38
58

It seems to be a permissions issue on one of the files deep in the .app that you moved to the applications directory.

Open Terminal or iTerm and type "chmod -R 755 " and drag the .app into the window, which will bring the full path into Terminal or iTerm.

It will look like this:

chmod -R 755 Path\ to\ app\ file.app

Press return

Then, you can open the app file normally, but it will fail because gatekeeper won't be able to verify the file. From there, go into your "Security and Privacy" in "System Preferences" and then click to allow the app to open.

Steven
  • 854
  • 6
  • 7
  • `chmod: -R: No such file or directory` when i try directly on the .app file – iamse7en Nov 21 '20 at 23:55
  • 1
    Given example is a bit invalid. Correct is `chmod -R 755` – D.A.H Nov 29 '20 at 12:47
  • This worked for me (well, chmod `-R 755 Path\to\app\file.app`). – Webreaper Dec 11 '20 at 19:36
  • This worked for me with a Samsung printer Wireless Setup app. Thank-you! – SylvanK May 05 '21 at 17:37
  • This worked for me with a game made in nodewebkit (nwjs) – Alex Boschmans May 21 '21 at 11:22
  • 1
    Somewhat to my surprise, this worked for the Canon IJScan16f scanner driver for a Pixma MG 3051 printer/scanner. (Small. variation: I used `sudo chmod -R a+x /System/Volumes/Data/Library/Image\ Capture/Devices/Canon\ IJScanner16f.app`) – tripleee Aug 07 '21 at 11:22
  • [chmod 755](https://chmodcommand.com/chmod-755/) = (my emphasis) "sets permissions so that, User / owner can read, can write and can execute. Group can read, can't write and can execute. Others can read, can't write and ***can execute."*** – Peter Mortensen Nov 07 '21 at 15:42
  • Can you address the security implications of the use of 755 in your answer? (But ***without*** "Edit:", "Update:", or similar - the answer should appear as if it was written today.) – Peter Mortensen Nov 07 '21 at 15:44
  • Careful with that command, it'll make all files within the app executable. #securityFlags – donmontalvo Nov 15 '21 at 22:49
47

The problem in my case it was related to a Big Sur problem where UPX compressed binaries are not recognised properly, so they were not executed with a permission error.

There is some more information here: UPX compressed application fails to start on latest macOS release: Big Sur 11.01 #424

So the solution is to unpack the binary with UPX and run it normally.

Install upx with Homebrew (executable brew):

brew install upx

Now run this command:

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

(Please note you have to specify the full binary path.)

You should use the path of your binary instead of "/Applications/my_app.app/Contents/MacOS/my_app"

Then run the application normally.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
DeejonZ
  • 2,451
  • 2
  • 17
  • 19
26

I found a solution:

  1. You need to resign the app, (install Xcode tools, if necessary):

    xcode-select --install
    
    sudo codesign --force --deep --sign - /Applications/YourAppName.app
    
  2. Move the app to quarantine:

    sudo xattr -d -r com.apple.quarantine /Applications/YourAppName.app
    
  3. Go to /Applications/YourAppName.app/Contents/MacOs and make the file inside executable:

    sudo chmod +x Script_name
    

That worked for me and the app launched.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Indigo0087
  • 561
  • 6
  • 5
9

This answer will only apply to a specific set of applications

I had this issue with a universal binary (Terminal) that I duplicated and explicitly set in the info "Open using Rosetta" to run x86 tools like Homebrew. After updating to 11.0.1 from 11.0.0, the x86 version of the terminal stopped working with the above error.

I simply had to delete the duplicate, created another duplicate of the terminal and enabled Rosetta again.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
jaw
  • 932
  • 2
  • 10
  • 24
8

First figure out that your application signature is valid:

From Apple's official website:

All apps in the App Store are signed by Apple to ensure they have not been misused or tampered with. Apple signs any app that comes with Apple devices.

To check this out, you can type the following in your terminal (the path of Folx.app is just for an example and you should replace it with your desired app):

pkgutil --check-signature /Applications/Folx.app

if you get an "invalid signature" responce, something like this: enter image description here

Then your app maybe was installed in some hacky way! And now your easiest approach is to uninstall the app and reinstall it again.

Otherwise, you will have plenty of hard time to enjoy () with that app, Xcode, and signature stuff...

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
  • I can run my app with the upx command: but I tried to run your command before and after upx and I always see: "Status: no signature" even if the app is running fine after upx. So this command is not helping to understand the issue. – DeejonZ Jan 02 '21 at 10:38
  • This didn't change even after I got it working with a self-signed signature. – phyatt Jun 28 '21 at 03:46
4

You have to run SUDO xattr -d com.apple.quarantine <app>. It's important that you don't forget sudo or it won't work.

John James
  • 83
  • 6
  • Still didn't work for me, no change. Trying to run https://github.com/pixelomer/AltDeploy/releases – iamse7en Nov 22 '20 at 00:07
  • This worked for me (I had also run chmod as well as upx, but it wasn't working until this command; unclear whether those had impacts) – mikhuang Dec 13 '20 at 21:50
  • This keeps on coming up, but it has never worked for me for any similar problem. Just `xattr filename` will reveal whether this attribute is set and can be deleted; for me, this was never true. – tripleee Aug 07 '21 at 11:24
2

This is the only solution that worked in my case.

Download macOS-GateKeeper-Helper.

  • Open GateKeeper_Helper.command by double-clicking on it (if it says untrusted developer, go ahead and run it from Settings - Security & Privacy - General - Open Anyway)

  • Select Option 4 (Remove app from GateKeeper quarantine)

  • Drag and drop the app file from the Applications folder, hit the Return key, and enter your password

  • You will see a message like “App removed from quarantine”. That’s it. Try to open the app as usual.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Dave
  • 69
  • 7
0

I encountered this issue when sending to a colleague for testing a Mac app that I developed. He tried some of the suggestions on this forum, but they didn't seem to work (and we're both on Intel, so the Rosetta tips didn't apply).

What ultimately worked for me was creating a blank disk image, and then adding the .app file to the image and then sending him the disk image. It seems like the problem comes up when the .app file is compressed, and adding the file to a disk image first seems to help prevent the issue.

RyanBDevilled
  • 201
  • 1
  • 2
  • 7
0

If you are uploading an Xcode app to GitHub releases, make sure to compress it first on your computer, don't let GitHub compress it.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Ethan SK
  • 736
  • 8
  • 12
0

For my team, this turned out to be a problem with Git adding CRLF to the Entitlements.plist file.

Once I fixed the .gitattributes file to only use LF with p-list files, I built a new app and had it codesigned and it worked--no aborts. I also had to make sure Jenkins wiped the workspace since it didn't seem to fix the file at first.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
mw2785
  • 37
  • 1
  • 5
  • I had to do sudo su in order to make all files writeable. But why are they badly set up so the usual uninstall does not work. I am using Ventura – James Rome Feb 17 '23 at 17:04