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.
Update: Thanks to bradym for this.
The “System-Declared Uniform Type Identifiers” page has moved to: System-DeclaredUniformTypeIdentifiers.
34 responses to “OS X Leopard – Are you sure you want to open it?”
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!
@Gabriel you are welcome – glad it worked.
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.
@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…?
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.
@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.
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’.
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,
Not 100% sure, although I would think something like:-
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?
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:
or if you knew the property list type, you could include it with the LSRiskCategoryContentTypes key, like this for foobar.tar archives:
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.
Hello, I created the file com.apple.DownloadAssessment.plist with Textedit, put it in ~/Library/Preferences but it doesn’t work even after 2 restarts. I am using a French OS 10.5.5, this file has e generic icon but not a plist icon, but has the right extension .plist (not RTF). Any idea how to fix it please ? I hate these stupid warnings every time I launch a new app to test it …
sorry to tell, but doesn’t work for me – I’m on 10.5.4 and I’w created plist file with bbedit. rebooted, tested, restarted… changed creator to Property List Editor, rebooted, tested, restarted… And I’m still “sure that I want to open those files” 🙁
what can be wrong?
file is coded as utf-8 no BOM with LF line breaks… was placed in ~/Library/Preferences and than moved to /Library/Preferences and I was working at list for 30 minutes to fin why it isn’t working for me, but I have no more ideas.
tnx for any help…
btw, what are “Safe Preferences” for?
(here is mine file)
Micmac, the file has to be a plaintext filetype also, which is not the default format in TextEdit. Make sure you change the format to plaintext before saving it.
@Lisa, thanks for mentioning this as it is to forget.
@Micmac and @Janimir – try re-saving the .plist file as plain text from TextEdit.
In TextEdit the quick key to convert to plain text is Apple+Shift+T (Apple = Command key on modern Keyboards).
Hopefully that will solve the problem?
Not works on 10.5.6.
UTF-8 (Plain text):
I haven’t updated to 10.5.6 yet – been without broadband for the last few weeks.
This all needs checking and re-clarifying, so I’ll probably write up a new post when I’ve upgraded and tested.
yes not working in 10.5.6 =(
please update the setups if someone figures it out
thanks in advance
If you accidentally tell the OS to never open the application.. is there any way to delete that setting from the system’s list?
@Jay, not sure if there is a way to delete the setting – I usually just open the app again and the OS asks the questions again – if that doesn’t work, try re-downloading it?
@Davinian, thanks for the response. After sitting there staring at the system preferences for a little while, and redownloading fruitlessly, I decided to do the #1 fix-it a computer has. I rebooted.
Lo and behold, it worked 😀
Not sure what the problem was, but now it’s gone.
@Jay, lol – excellent, well at least you got it working, and thanks for sharing that, I bet loads of people have the same problem.
This is an excellent post on how to fix this problem for files that you know are safe. I have went through the list that Apple has but I cannot find an exception for a .inc file. Everything else works for the files that I normally upload and download via ftp, but I can’t get the .inc file to open as it should without the warning.
@Chris, what are the .inc files for – what application/programme?
@Davinian, Thanks for the response! The .inc file is an include file for other php files that call on them. They just “include” other info that the php file does not have built in. If this helps any. I was just confused because I didn’t see that file on the list that apple had.
Hi there I have setup a standard user account on OS10.5 and everytime i open VLC or Firefox i get the damn are you sure you want to “Are you sure you want to open it?” and it happens everytime.
@marcus, I was having the same problem. Then I read elsewhere that the application needed to be opened by the original downloader first – I had downloaded Firefox using an administrator account. I never opened Firefox under this administrator account, instead logging in to my standard account and getting irritated by the warning every time I opened Firefox. After logging into my administrator account, running Firefox once, I then quit, logged out and logged into my standard account – and the problem was solved.
I had loads of problems getting this to work! The instructions were perfect, but for some reason whenever I created the file myself, nothing would happen. I did a search of my mac because I thought there might be some sort of file conflict, and I saw a zip file called com.apple.DownloadAssessment.plist.zip that I must have downloaded the last time I tried to get this working! I unzipped it, overwrote the existing file, then I opened it in plist editor (part of the apple dev tools – free to download) added a new string for the extension type I wanted, and it worked perfectly! Cheers for the instructions, and if anybody is still getting problems, try downloading someone else’s plist file – or take a copy of an existing plist in the preferences folder, rename it and then edit the details using plist editor.
Thanks for the tip!
The “System-Declared Uniform Type Identifiers” page has moved to: http://developer.apple.com/mac/library/documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html
Thank you for this amazing tip. It works for downloading and automatically opening “Safe” files after downloading, which is a Safari preference.
Any idea if something similar can be done for Firefox ? I am trying the built in Firefox options for setting what to do with files when downloaded (my aim is to download a certain file and open with an application) but even after doing so i get the pop-up asking me what to do, and yes i have selected to do this automatically for all file types and made sure it si iset correctly in the preferences, but no luck 🙁
Thanks for the tip. For webarchive files you can add the line:
to the com.apple.DownloadAssessment.plist file.
And for Keynote users, if you want to open a pdf file from within the Keynote (normally you can not do this) you can create a web page with iWeb and publish it to a local folder on you Mac and then refer from your Keynote presentation to this local web page, where this local web page as a proxy/intermediary for the files you want to reach . The trick is, within the iWeb web page you can call a pdf file using Hyperlink (as in Keynote) feature and choose the option “File” for the hyperlink.
This may be helpful for the ones who wants to show an external file incl. Pdf files from within their Keynote presentation. And the above mentioned method can also be used to show offline/stored web pages using .webarchive files from within Keynote presentations.
works great on .doc and .xls but NOT with .xlsx or .docx. Any thoughts???
Try this but adjust for your security needs…
Help! I’m in nerd hell! I have a Kobo e reader and have successfully borrowed e books from the library for months. Yesterday I downloaded a book from the library to my Mac but it won’t go into the Adobe Digital Editions. Adobe’s website lists this site as a resource to fix the problem; I’ve copied the above file and added public.acsm and it didn’t work. I tried .acsm and acsm and they didn’t work. Can you please help? Thank you!