Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

Om de ûnderfining foar jo te ferbetterjen is tydlik de funksjonaliteit dan dizze website troch ûnderhâldswurk beheind. Wannear in artikel jo probleem net oplost en jo in fraach stelle wolle, kin ús stipemienskip jo helpe yn @FirefoxSupport op Twitter en /r/firefox op Reddit.

Sykje yn Support

Mij stipescams. Wy sille jo nea freegje in telefoannûmer te beljen, der in sms nei ta te stjoeren of persoanlike gegevens te dielen. Meld fertochte aktiviteit mei de opsje ‘Misbrûk melde’.

Mear ynfo

Dizze konversaasje is argivearre. Stel in nije fraach as jo help nedich hawwe.

Unable to lock preferences on Windows with ESR-60 and above

  • 2 antwurd
  • 1 hat dit probleem
  • 2 werjeftes
  • Lêste antwurd fan Dwight

more options

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 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.

Keazen oplossing

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.

Dit antwurd yn kontekst lêze 👍 0

Alle antwurden (2)

more options

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

more options

Keazen oplossing

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.

Bewurke troch Dwight op