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!

Fungovanie tejto stránky je z dôvodu údržby dočasne obmedzené. Ak článok nevyrieši váš problém a chcete položiť otázku, napíšte našej komunite podpory na Twitter @FirefoxSupport alebo Reddit /r/firefox.

Vyhľadajte odpoveď

Vyhnite sa podvodom s podporou. Nikdy vás nebudeme žiadať, aby ste zavolali alebo poslali SMS na telefónne číslo alebo zdieľali osobné informácie. Nahláste prosím podozrivú aktivitu použitím voľby “Nahlásiť zneužitie”.

Ďalšie informácie

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

  • 2 odpovede
  • 1 má tento problém
  • 2 zobrazenia
  • Posledná odpoveď od 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.

Vybrané riešenie

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.

Čítať túto odpoveď v kontexte 👍 0

Všetky odpovede (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

Vybrané riešenie

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.

Upravil(a) Dwight dňa