Tap here to go to the mobile version of the site.
Your Firefox is out of date and may contain a security risk! Upgrade Firefox

Support Forum

block file protocol (file:///, "c:/")


I work for a university and we want Mozilla 17 in our computer labs. We have GPO on Windows 7 to blocks access to our C drive so students can't see secure files, but mozilla ignores it. Is there a way to disable typing these things such as, "file://C:/Windows" or "C:\" that gives access to the files?

I have tried a few add-ons but all they do is hide the links to the folders, but you can still execute and open files. Also I have added the following to user.js:

user_pref("capability.policy.policynames", "localfilelinks"); user_pref("capability.policy.localfilelinks.checkloaduri.enabled", "noAccess"); user_pref("capability.policy.localfilelinks.sites", "file:///");

Any help would be appreciated!


Additional System Details


  • User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11

More Information

finitarry 157 solutions 2184 answers

Normally you would put a hostname with protocol in the "sites" setting to limit what that site may do. You are blocking "file:///" from loading links, but that is only a protocol, not a site. I think that is the problem, anyway.

An Oracle 0 solutions 3 answers

I would love to see Firefox respect the GPO to prevent viewing local drives. It doesn't exist.

finitarry 157 solutions 2184 answers

If you want to block students from reading files on the computers they use, can you use "" instead of "file:///"?

An Oracle 0 solutions 3 answers

finitarry, are you suggesting putting that in the user.js file or somewhere else? Have you done this yourself or are you just brainstorming? Thanks.

finitarry 157 solutions 2184 answers

What normally appears as the data for "sites" is the hostname of a site. I am suggesting that you use the localhost IP number. I have no idea if it will work, but it makes sense to me.