Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 (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?

share|improve this question
up vote 44 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.

share|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

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 my_jar.jar

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

And the following was posted on 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.

As an aside: sometimes one needs to start a single program multiple times on a Mac. That can be done using cd /Applications/some-application/ followed by open -n "Application". This really needs the .app suffix; running open -n "Application Name" might get one GateKeeper stopping access:

"Application Name" can't be opened because it is from an unidentified developer.

Your security preferences allow installation of only apps from the Mac App Store and identified developers.

Above, even removing the extended attribute does not fix that, but using the .app suffix works just fine.

(I am not advising anyone to actually get rid of the security measures.)

share|improve this answer
 xattr -d /path/to/file
share|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? – Landon Kuhn Mar 27 '12 at 19:50
@landon9720 - The (currently) below answer has a comment that allows you to instruct xattr to work recursively over contents of a supplied directory – user66001 Jul 23 '13 at 1:45
find /path/to/dir -exec xattr -d {} \; – Sepehr Lajevardi Jul 16 '15 at 16:30

You can disable the warnings permanently with defaults write LSQuarantine -bool false. It also disables the Gatekeeper dialogs even if you haven't allowed applications downloaded from anywhere in System Preferences.

share|improve this answer

I found the following command

find | while read l; do echo $l; xattr -d "$l"; done

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

share|improve this answer
You could also use xattr -rd – user495470 Sep 22 '12 at 9:22
You don't need the while... loop. find can do it all: " find -print -exec xattr -d {} \; " – rivimey Jun 15 '15 at 16:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .