codesign --force --deep --sign - /Applications/AppName.app
This worked for me on macOS Big Sur. Arqtistic - https://developer.apple.com/forums/profile/Arqtistic posted a link to Stackoverflow - https://stackoverflow.com/questions/64842819/cant-run-app-because-of-permission-in-big-sur/64895860#64895860. ajmas - https://developer.apple.com/forums/profile/ajmas mentioned that some of you may have problems opening apps because of a signature error. This signs the app again. Make sure to replace "/Applications/AppName.app" with your app by removing this line and drag and drop you app into the terminal, so the path gets automatically copied.
This may not be the solution for everyone. You may have to use "sudo spctl –master-disable" before. Don't forget to enable it again even if nothing worked.
Topic:
App & System Services
SubTopic:
Core OS
Tags: