4

In macOS Big Sur (v11.2.3), how can I completely disable the following warning (see screenshot), for all applications I ever download? Yes, I know of the potential security risks, and I'm willing to take them.

I've tried:

sudo defaults write com.apple.LaunchServices LSQuarantine -bool NO

And I've also completely disabled Gatekeeper:

sudo spctl --master-disable

I tried rebooting my system, but still, macOS keeps adding the quarantine flag to any new files I download (I'm not concerned about old ones I've already downloaded). What else can I try?

screenshot

megamer
  • 270
  • 3
  • 10
  • 2
    As a workaround, you might consider attaching a folder action script to your downloads folder which automatically strips off the quarantine attribute from any file that appears in that folder. – Spiff Mar 24 '21 at 00:02
  • @Spiff - Thank you for the suggestion! See my answer below :) – megamer Mar 27 '21 at 00:44

1 Answers1

1

Unfortunately, I haven't found a way to do this natively. But as @Spiff recommended in the comment above, there is a workaround:

First, install Homebrew, if you haven't already. Then, run the following three commands in your Terminal:

brew install watchman
watchman watch ~/Downloads
watchman -- trigger ~/Downloads removequarantine '*' -- ~/remove-quarantine.sh

The first command will install watchman, an open-source file watching tool. The other two commands will set up a watcher for the Downloads folder. Anytime a file is added or modified in that folder, watchman will call the script in ~/remove-quarantine.sh. We still have to create that script. Using a text editor, create a new file and name it remove-quarantine.sh, place it in your home folder, and add the following line to it:

xattr -dr com.apple.quarantine ~/Downloads/$1

You can find more details in a blog post I made about this.

megamer
  • 270
  • 3
  • 10