
How can I enable links from an internet/intranet site to a local file in Firefox 4?
I'm trying to allow links from an intranet page to a local file (e.g. "file://///server/share/file.jpg"). I found several articles and forum posts about doing this in older versions of Firefox (such as setting security.checkloaduri to false), but nothing seems to work for Firefox 4. Is there a new config option that I need to set to get this to work? Thanks.
All Replies (11)
I figured it out with firefox security policies. I had tried them before but was thinking that "capability.policy.localfilelinks.sites" needed a list of local target paths instead of sites that contain the links. Now that I adjusted it to the initial site it's working as expected.
darren199, can you tell what you did to get that issue resolved ?
I am having the same problem :
Security Error: Content at http://intranet/group/maeva/documents may not load or link to file://///192.168.15.75/Downloads/rich.rtf.
I created a user.js as suggested in the website (http://kb.mozillazine.org/Links_to_local_pages_don%27t_work) :
user_pref("capability.policy.policynames", "localfilelinks"); user_pref("capability.policy.localfilelinks.sites", "http://intranet"); user_pref("capability.policy.localfilelinks.checkloaduri.enabled", "allAccess");
and the file is in C:\Users\Administrator\AppData\Local\Mozilla\Firefox\Profiles\hen5yfyq.default
After restarting Firefox, I am still stuck with the same error.
btw, the same links work in IE.
Same results with file://server/share/file and file://localhost//server/share/file. I tried several URLs of this kind, but FF still stops with the same error message
Modified
I think your problem is that you put the users.js file in AppData/Local instead of AppData/Roaming. I had pretty much the same users.js file, but mine was in C:\Users\<username>\AppData\Roaming\Mozilla\Firefox\Profiles\ih5jaq2w.default
You can use:
- Help > Troubleshooting Information > Profile Directory: Open Containing Folder
I have this problem as well. I am using Windows XP with Firefox 4 so don't have a local and roaming appdata directory. I have tried putting lines from the kb in my prefs.js and user.js and neither allow me to look at the unc path in the link. Anyone have any suggestions on how to get things working ?
I don't have an XP machine handy to test on, but my thinking would be to add the lines to C:\Documents and Settings\<username>\Application Data\Mozilla\Firefox\Profiles\<profilename>\user.js. If that's where you have them and it's not working I'm not sure what the problem would be.
Thanks for response darren199 - I have the following in user.js in the path you suggest :
user_pref("capability.policy.localfilelinks.checkloaduri.enabled", "allAccess"); user_pref("capability.policy.localfilelinks.sites", "http://<hostname> http://<hostname2> http://<hostname3>"); user_pref("capability.policy.policynames", "localfilelinks");
And when clicking on a link :
file:///\\<hostname>\<share>\sysinfo\server.txt
The error console says :
Security Error: Content at http://intranet/systems/sys-info/server/info.shtml may not load or link to file://///<hostname>/<share>/sysinfo/server.txt.
Just to confirm, your entries in capability.policy.localfilelinks.sites are intranet servers on which the links are posted, right? (Just making sure it's not the same thing I was doing at first when I put destination URLs in there instead). And my links have different slash directions than yours, not sure if it matters. Mine are as follows (for your sample link):
file://///<hostname>/<share>/sysinfo/server.txt
As I said, I'm not sure if that's an issue, but it might be worth a try...
I have added entries to the config entry of http://<hostname> - no trailing slashes or paths etc where <hostname> is the name of the host as used in the UNC path.
The server is a windows box on our internal network which has a windows share setup of <share> and the files can be loaded in firefox fine if I right click on link and "copy link location" and paste into address bar of firefox.
I have altered the slashes to be the same as yours - no change sadly in outcome.
The NoScript extension has a setting to allow access to local files.
You can also try to access local files via file://localhost/C:/ or http://localhost/C:/
Got the bottom of this - problem was not firefox version 4 - problem occurred in version 3 as well.
The problem was all down to the source page of the link. The source page is hosted on an IIS server the CNAME by which it is accessed has recently changed - around the time I upgraded from version 3 to 4 of firefox....
So when I clicked on the UNC path based link I assumed incorrectly firefox was having troubles. I have added the CNAME used for the source page which contains the link to the UNC path and now when clicking on the link - all works !
So not sure why but the source CNAME has to be in the list of URLs but it works so.......