Manage OS X's Downloaded File Warning System

When Apple shipped Mac OS X 10.5, one of the new features was a warning about opening downloaded files (this feature is also present in Mac OS X 10.6). The first time open you such a file, a dialog appears, asking if you're sure you want to open the file, because it was downloaded from the Internet. The idea behind this feature is a good one--as a user, you should know when you're launching a program that's been downloaded, just in case it was somehow downloaded without your knowledge.

In practice, though, this "quarantine" feature can be incredibly annoying, depending on what sorts of files you download. In my case, it's a real pain because when I often download web-hosted applications, such as Geeklog (which runs macosxhints.com) and phpMyAdmin, a tool for managing MySQL databases.

These downloads can consist of thousands of files, typically a combination of images and text files. The text files are a mix of HTML, PHP (a scripting language), and pure text, but none are actually Mac OS X executable files. The first time I try to open each of those thousands of text files for editing, I see the warning dialog. After about the fifth file, I become very irritated by the warning, and it does more harm than good, as I just blindly click away at it to make it vanish.

There are two solutions to this problem--one removes the warning dialog from already-downloaded files, and the other prevents any future downloads from being flagged with the warning. Note that you do not have to implement both solutions; you can just remove the warning from already-downloaded files while leaving the warning system itself active, if you prefer.

Remove warning from downloaded files

To remove the warning dialog from already-downloaded files, you need to use Terminal (in Applications -> Utilities), and the command itself differs slightly between 10.5 and 10.6. In 10.5, copy and paste this command:

find ~/Downloads/geeklog-1.6.1 -type f -exec xattr -d com.apple.quarantine {} \;

In 10.6, copy and paste this command:

xattr -d -r com.apple.quarantine ~/Downloads

Note that these commands can take a while to run if there are a lot of files in your Downloads folder. You can also change the directory they run on by modifying the ~/Downloads bit of the command--just change it to reflect the full path to whatever folder you'd like to update. (Remember to use backslashes before spaces, if any of the items on the path contain spaces.)

I personally use this method alone, while leaving the warning system itself active--I just really don't need to be warned 1,653 times when I try to open each of the files in the Geeklog distribution.

Permanently disable the warning system

If you'd like to disable the warning dialogs completely (for any files you download in the future), open Terminal and copy and paste this command:

defaults write com.apple.LaunchServices LSQuarantine -bool NO

After you get the command prompt back (you won't see any feedback; the command prompt will simply appear again), restart your Mac. From now on, you won't be warned when opening downloaded files. It goes without saying, but making this change reduces the security of your machine. As I mentioned earlier, I've chosen to leave the warning system in place, and just remove the warning flag from downloaded files when I feel the need.

If you do permanently disable the system, and then decide you'd like it back, repeat the above command, but change NO to YES and reboot your Mac.

I have tested both the one-time and permanent solutionn methods on 10.5 and 10.6, and they work as described (including the bit to turn the warnings back on). Thanks to Jonathan Rentzsch, Ken Aspeslagh, and Timothy Luoma for various pieces of this hint.

Subscribe to the Best of TechHive Newsletter

Comments