Unable to lock preferences on Windows with ESR-60 and above
I have the issue noted in shekpal's post on https://support.mozilla.org/en-US/questions/1229450/edit/1167251. It seems to be limited to installation of ESR-60 (and above) on Windows platforms. With ESR-52.9 (and older) the files which I placed into "Program Files\Mozilla Firefox\defaults\prefs\local-settings.js" and "Program Files\Mozilla Firefox\mozilla.cfg" are able to make settings and lock preferences. The settings which I used in the files are similar to those listed by shekpal. When I use the same files, in the same locations with ESR-60 (and above) installed on Windows 7 or Windows 10: I open about:config and same the settings are either listed as "user set" or "default" and can be changed. That is not desired behavior. I have also placed the same files into installation of ESR-52.9 and ESR-60 (and above) on Linux installations (as "/usr/lib64/firefox/mozilla.cfg" and "/usr/lib64/firefox/defaults/preferences/local-settings.js") and the locked behavior is as desired--about:config shows the settings as locked. I followed the steps in https://support.mozilla.org/en-US/kb/customizing-firefox-using-autoconfig to completely reset and used the names of autoconfig.js and firefox.cfg. I ensured that the first line was a comment. Nothing restored the desired functionality on a Windows system. An additional anomaly which I did find is that if I have "Program Files\Mozilla Firefox\defaults\prefs\local-settings.js" in place without the referenced mozilla.cfg file in place gives these results: Firefox 52.9-ESR displays an error that preferences cannot be found and closes. That is expected behavior. Firefox 60.3-ESR opens without displaying an error.
Επιλεγμένη λύση
I managed to correct the issue. The fix is to ensure that autoconfig.js (as described in https://support.mozilla.org/en-US/kb/customizing-firefox-using-autoconfig ) is Unix formatted on a Windows system. This may be counter-intuitive, but that was it. Either create the file in Notepad++ with settings to use Unix (LF) format for line ending or run "dos2unix" after file is created if using notepad. By merely running dos2unix on my file (which was named local-settings.js), the same settings which had worked since 2011 now work on Firefox 60.3.0-ESR. The configuration file ("mozilla.cfg") is still DOS formatted and works without running dos2unix.
As for "customizing-firefox-using-policies.json", that does not work because some of the settings desired are not in the listing of policies which can be defined. That is in addition to a security auditing requirement that opening about:config will show specific settings marked as lockPref.
Ανάγνωση απάντησης σε πλαίσιο 👍 0Όλες οι απαντήσεις (2)
Hi Dwight:
This is a Firefox for Enterprise question and so I moved the question from "Firefox" to "Firefox for Enterprise". This Forum is for "Firefox" NOT "Firefox for Enterprise". Confusing but true and this happened only a few releases ago so even more confusing :-)
I think that our documentation for Firefox for Enterprise should help, specifically
https://support.mozilla.org/en-US/kb/customizing-firefox-using-policiesjson
If not, I'll get our Firefox for Enterprise folks to help.
Cheers!
....Roland
Επιλεγμένη λύση
I managed to correct the issue. The fix is to ensure that autoconfig.js (as described in https://support.mozilla.org/en-US/kb/customizing-firefox-using-autoconfig ) is Unix formatted on a Windows system. This may be counter-intuitive, but that was it. Either create the file in Notepad++ with settings to use Unix (LF) format for line ending or run "dos2unix" after file is created if using notepad. By merely running dos2unix on my file (which was named local-settings.js), the same settings which had worked since 2011 now work on Firefox 60.3.0-ESR. The configuration file ("mozilla.cfg") is still DOS formatted and works without running dos2unix.
As for "customizing-firefox-using-policies.json", that does not work because some of the settings desired are not in the listing of policies which can be defined. That is in addition to a security auditing requirement that opening about:config will show specific settings marked as lockPref.
Τροποποιήθηκε στις