Fix missing macOS Gatekeeper function from the command line

How to enable or disable Gatekeeper from the command line in macOS Sierra to enable the missing Anywhere option | rawinfopages.com

Apple has tweaked many settings and functions in macOS Sierra and there is one puzzling change in Gatekeeper. A useful function has mysteriously disappeared, but fortunately you can bring it back.

Gatekeeper is a security feature that was introduced into OS X as far back as Lion and Mountain Lion. The aim of Gatekeeper is to prevent malware and bad apps downloaded from the internet from being accidentally installed on the Mac.

Prior to macOS Sierra, there were three settings for Gatekeeper and these can be seen if you go to the Apple menu and select System Preferences, then click Security & Privacy.

On the General tab are three settings under Allow apps downloaded from:

Gatekeeper settings on the Apple Mac prevent malware and bad apps from outside of the Mac App Store from being installed

Mac App Store only

The top setting, App Store, is the most secure and it improves the security and protects the Mac by preventing you from running or installing any app downloaded using Safari or another web browser. Only apps downloaded from the Mac App Store can be run.

Unfortunately, there is a lot of great Mac software outside of the store and although this option is the best and the most secure, you will miss out on top software like Adobe Photoshop and other apps.

Mac App Store and approved apps

The second setting, App store and identified developers, partially gets around this problem by allowing software from approved developers to run.

Anything goes

The third setting, Anywhere, allows software downloaded from any website to run. There are some fantastic Mac apps that are not in the Mac App Store and are not on Apple’s approved list, so this is a useful option for people that know what they are doing and are aware of the possible, but rare, dangers.

The trouble is, that last setting has gone from macOS Sierra, which means that many apps, some of which excellent, are blocked. You cannot install them or run them.

Check your options

Open System Preferences, Security & Privacy.

If the Anywhere option is visible in macOS, it is because it was set that way with El Capitan.

If you don’t see the Anywhere option, there is no way to select it. What’s more, if you have the Anywhere option and then select one of the others, the Anywhere option disappears and you cannot select it anymore.

The Gatekeeper options in System Preferences in macOS Sierra on the Apple Mac

Bring back the Gatekeeper Anywhere option

That third option, Anywhere, is hidden, but there is a way to bring it back. Open Terminal in the Applications\Utilities folder and type:

spctl --status

This reports the status of Gatekeeper and tells you if it is enabled. If it is, it says ‘assessments enabled’.

To turn off Gatekeeper and bring back the Anywhere option, type:

sudo spctl --master-disable

In the screenshot you can see I typed the disable command without the sudo first and it says ‘Permission denied’. you need the sudo to run the spctl command with your admin password.

Use the Terminal command line to enable or disable Gatekeeper on the Apple Mac

If you now return to System Preferences, Security & Privacy, the Anywhere option is back and is selected.

Is it safe?

This is not a good setting for everyone and I wouldn’t leave it that way all the time. Enable it when you need to and if you know what you are doing. There are some bad apps on the internet, but there are some great ones too. Use your common sense and stay safe.

 

Share

Comments

2

You can also allow only specific apps instead of disabling gatekeeper all together by following the guide at: https://stackengineer.com/macos/allow-apps-anywhere.html

Thanks for those

Add new comment

By submitting this form, you accept the Mollom privacy policy.

Related items you will like...