I've downloaded some .jar files from the internet and want to use them under Mac OS X. But the OS seems to have tagged them with the extended attribute com.apple.quarantine (no indication of this until I noticed the "@" in the ls -l and figured out how to use ls -l@) -- apparently because they have been downloaded from the internet. What's the right way to deal with this?

link|improve this question

71% accept rate
feedback

5 Answers

up vote 9 down vote accepted

This attribute is added so that it can ask for user confirmation the first time the downloaded program is run, to help stop malware. Upon confirmation the attribute should be removed and then the program will run normally.

link|improve this answer
ahhhhhh.... ok that makes sense. So it's a contract between browser implementations that save files, and the OS and/or Java when it runs executables. – Jason S Aug 23 '09 at 22:02
feedback

You don't have to deal with it. Open it and OS X will ask for your permission. Or like richard suggested, delete it using something like:

xattr -d com.apple.quarantine my_jar.jar

To do this automatically for any downloaded file you can attach a folder action to the download folder, like described on macosxhints.com in 10.5: Remove the 'downloaded file' warning flag.

And the following was posted on macosxhints.com a long time ago, for Safari: 10.5: Disable the 'downloaded from internet' file warning, claiming one can remove VerifiedDownloadPlugin.plugin from /Library/Internet Plug-Ins. I did not test that.

(I am not advising anyone to actually get rid of that security measure.)

link|improve this answer
feedback
 xattr -d com.apple.quarantine /path/to/file
link|improve this answer
Don't use sudo when you don't have to. – Sidnicious Aug 25 '09 at 15:17
Edited the answer to remove 'sudo'. – Richard Hoskins Aug 25 '09 at 16:10
How do you do this recursively to all files in a directory? – landon9720 Mar 27 at 19:50
feedback

The warning dialogs can also be disabled globally (ignoring the quarantine attributes) with:

defaults write com.apple.LaunchServices LSQuarantine -bool false
link|improve this answer
feedback

I found the following command

find UWKProcess.app | xargs -I {} xattr -d com.apple.quarantine "{}"

very helpful when trying to get rid of the attribute. Note the double quotes around {} - you need them if your apps folder contains files with a blank in their name.

Thomas

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.