OS X Leopard - Are you sure you want to open it?

I think by now, every OS X Leopard users will be well acquainted with the warning message “Are you sure you want to open it?”. Apple’s over cautious security feature thats been described by some as a Vista-esque feature, but for me it’s just a real pain in the backside.


Basically every file downloaded from the internet is tagged by the OS depending on its file type. If the download is an application or script, the OS will warn you with the above message when you first try and open it. Fine if you are opening one or two files, but not if you are trying to open up 20+ files at a time.

There is some reasoning behind this security feature, but I can’t help think that Apple should have included a way to turn it off or at least configure what file types the user deems ’safe’ or ‘unsafe’.

After Googleing for a solution I discovered two options. The first is by Henrik (Lift the Leopard download quarantine) is a simply Apple Script folder action that you apply to your Downloads folder. Every time a file is downloaded the Apple Script removes the ‘unsafe’ tag from it and thus banishes the warning message. The only problem I can see with the script is that is dose not work its magic on files within sub-folders.

The second is by Lazeez (Changing the system’s default settings for html files (safe)) and is my preferred solution. Basically you need to create a file called com.apple.DownloadAssessment.plist with a list of the file types you consider ’safe’, you then need to save it to the ~/Library/Preferences folder, log-out or reboot to activate the changes, and no more warning messages!

The file looks like this:-

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>LSRiskCategorySafe</key>
<dict>
	<key>LSRiskCategoryContentTypes</key>
<array>
	<string>public.html</string>
	<string>public.php-script</string>
</array>
</dict>
</dict>
</plist>

You can see I have added two strings, public.html and public.php-script this allows me to open both .html and .php files without the warning. A full list of file types can be found on the Apple Developer site: System-Declared Uniform Type Identifiers.

To add more, simply add in <string>file.type.here</string> (The file type Identifier)

I hope this helps other Leopard users as much as it has helped me - as any unnecessary clicks can really start to slow a work flow down.

April 15th, 2008 Posted in Apple, OS X

11 Responses to “OS X Leopard - Are you sure you want to open it?”

  1. Gabriel Says:

    THANK YOU!

    This has been the most annoying feature about leopard, I can understand it for applications but php files?! And I don’t understand at all why they didn’t create any easy way to stop the warnings, even in Vista you can turn them of.

    Thank you again, I’ve seen this tip before but never gotten it to work but this worked perfectly!



  2. Davinian Says:

    @Gabriel you are welcome - glad it worked.



  3. Torossian Says:

    Thanks for the tip. I wanted to make a new .plist file but there was one already with a “safe” extension amz, which I’m guessing is something Amazon’s mp3 downloader had created.

    Great stuff, thanks.



  4. Davinian Says:

    @Torossian, I haven’t heard of any apps creating the “safe” list - but you are right .amz is an Amazon downloader file-type.

    I must confess it also seems a security risk if apps can create/append the safe list…?



  5. Rocket Says:

    Arrgh! This looks really simple…but it hasn’t worked. Any ideas? To create the file I got opened one of the existing ones in preferences and pasted in the above content and changed the name.



  6. Davinian Says:

    @Rocket, use TextEdit to create the file, but make sure you call it “com.apple.DownloadAssessment.plist” when you save it to the ~/Library/Preferences folder.

    Let me know if you are still having problems.



  7. Rocket Says:

    Right its working now. I don’t think I did anything differently but at least its working. Thanks for the reply. I’m a bit unimpressed with Apple for building that feature into Leopard, especially without an obvious way to turn it off. I remember when Apple stuff used to just ‘work’.
    Thanks again.



  8. Dave Says:

    Nice find.

    Any idea how you add a file type that is not listed on the Dev site? For example, I download a lot of .seq files which are in fact just .txt files (DNA sequences). Any ideas on how I would add those? The warning is incredibly irritating. Thanks,



  9. Davinian Says:

    @Dave

    Not 100% sure, although I would think something like:-

    <string>public.seq</string>

    If you want to send me a .seq file I will have a play around with it and let you know if I can get it to work?



  10. Howard Says:

    Might want to check out Macenterprise.org’s page about this.

    There are a few values that can be used, so if you have a foobar.seq file like the poster above, include it like:
    LSRiskCategorySafe

    LSRiskCategoryExtensions

    seq

    or if you knew the property list type, you could include it with the LSRiskCategoryContentTypes key, like this for foobar.tar archives:


    LSRiskCategorySafe

    LSRiskCategoryContentTypes

    public.tar-archive



  11. Dave Says:

    Hey guys,

    Thanks for your help. So far, I cannot get Leopard to ignore the warning for these .seq files. If anyone wants to give it a try, I’m happy to email a sample.



Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Copyright © 2008 Davinian.   Terms of Use | Privacy Policy
Powered by WordPress | Theme based on Blue Weed by Blog Oh! Blog.
Entries (RSS) and Comments (RSS)