Emil Atanasov blog

Mac Unlock files

If you are using macOS, then probably you’ve seen some special security measurements that macOS takes. Those could be a bit annoying when you know what are you doing. (If you are a developer and things are under your control.) In general, every layer of security adds extra complexity that you should know how to “fix”.

This is a useful command to deactivate the security attribute for a specific folder.

sudo xattr -dr com.apple.quarantine <folder> 

It works on folders(files) which are marked by macOS as suspicios. Usually, those are downloaded from Internet and extracted.

The com.apple.quarantine attribute is added to prevent malware being executed. Upon first run, the macOS asks the user for confirmation and removes the attribute automatically if the users confirm. The next time the program will run normally.

The above command is quite useful when you extract external SDK somewhere on your disk. If you don’t use it, then you could get 1001 pop-ups before the SDK starts working as expected.

Last but not least, the security attribute is added if you use any 3rd party software that fetches content from Internet. You can check the image - PepperFlashPlayer.plugin was quarantiened because it was download using Microsoft Remote Desktop.