Changing the system’s default settings for html files (safe)

2:42 am
Apple, Leopard, Mac, Tips, how-to

With Leopard 10.5.1, Apple’s developers changed the default status of html files downloaded from the internet from ’safe’ to ‘Unsafe’.

While this may make sense from a security standpoint, for somebody like me that processes hundreds of html files downloaded every day, it’s a big annoyance.

I filed a bug with Apple, asking for a workaround. I was hoping that they would implement a preference somehow to enable me to either override the default settings or allow me to specify trusted servers.

Tonight, three months later, I received an answer and the workaround that I was looking for.

I turned out that you could have a user specific file to override the system’s default settings. The file is not there normally, so you would need to create it. It is:

~/Library/Preferences/com.apple.DownloadAssessment.plist

The contents of the file need to be:

<?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>
</array>
</dict>
</dict>
</plist>

Hopefully that helps somebody else with this type of problem.

If you need to change the settings of other file types, here are the system-declared file types:

System-Declared Uniform Type Identifiers

For each type you add another <string></string> item to the above array.

For example, for jpeg2000 files you add:

	<string>public.jpeg-2000</string>

Right below the other <string> line.

For more info on how this works and other variations, you can go to this page:

Modifying Safari Safe Files

10 Responses

  1. OS X Leopard - Are you sure you want to open it? Says:

    [...] second is by Lazeez (Changing the system’s default settings for html files (safe)) is my preferred solution. Basically you need to create a file called [...]

  2. Dan Says:

    THANK YOU! These stupid security alerts drive me nuts. I wish there was an easy way to shut it off completely. If you know anything about computers you shouldn’t need it.

  3. Peter da Silva Says:

    These are there as a result of two stupid decisions by apple, copied from Microsoft:

    1. open “safe” files after downloading.
    2. hide file extensions for known file types

    Instead of backing off these bad ideas, Apple implemented a copy of the tool Microsoft uses to train people to answer “YES” to “badguy.com wants to install a virus on your computer. Is this OK? (Install) (Panic)”. Whiskey Tango Foxtrot, Apple.

  4. Kelsang pagchen Says:

    I also added this line so I can zip php files I just downloaded with CleanArchiver:
    public.php-script

    thank you so much, its a savior for me !

  5. Kelsang pagchen Says:

    sorry it should read:
    public.php-script

  6. Winstrong Says:

    Thanks very much for posting this and making it easy to find with a Google search.

  7. Peter da Silva Says:

    Well, crap, Safari seems to be ignoring DownloadAssesment.plist.

  8. Jasper Says:

    This didn’t work for me, I’m trying to add torrents to the safe list. both links are dead so i can’t find the file type stuff :/

    osx 10.5.6

  9. Öppna flera php-filer i ett svep – Macbloggen Says:

    [...] av informationen i artikeln är hämtad från den här artikeln och den här på macosxhints. Även My Macinations har en artikel. Rekommendera artikeln till [...]

  10. me Says:

    doesn’t work for me either!

Leave a Comment




Your comment


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>

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.