Public bug reported: repro 1. launch snap using firefox -P 2. create test profile 3. open about:prefs set bool toolkit.policies.perUserDir=true 4. ensure no file at /etc/firefox/policies/policies.json 5. ensure file at: /run/user/$(id -u)/firefox/policies.json 6. close & restart firefox -P and select test profile
expected: policy parsed (and applied, if valid) actual: policy not parsed, error logged syslog AVC apparmor="DENIED" operation="open" profile="snap.firefox.firefox" name="/run/user/1002/firefox/policies.json" pid=303974 comm="firefox" requested_mask="r" denied_mask="r" fsuid=1002 ouid=1002 about:policies Error reading JSON file: [Exception... "Component returned failure code: 0x80520015 (NS_ERROR_FILE_ACCESS_DENIED) [nsIXPCComponents_Utils.readUTF8File]" nsresult: "0x80520015 (NS_ERROR_FILE_ACCESS_DENIED)" location: "JS frame :: resource://gre/modules/EnterprisePoliciesParent.sys.mjs :: _readData :: line 614" data: no] workaround for my use case, launching two firefox instances with different settings, abusing test feature: export XPCSHELL_TEST_PROFILE_DIR=magic then configure browser.policies.alternatePath=/etc/firefox/policies/custom.json Not a dupe, the default location /etc/firefox/policies/policies.json works: LP: #1975853 Background on the secondary location: https://bugzilla.mozilla.org/show_bug.cgi?id=1583466 ** Affects: firefox (Ubuntu) Importance: Undecided Status: New ** Tags: snap -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to firefox in Ubuntu. https://bugs.launchpad.net/bugs/2028822 Title: snap breaks alternate policies.json location of toolkit.policies.perUserDir=true Status in firefox package in Ubuntu: New Bug description: repro 1. launch snap using firefox -P 2. create test profile 3. open about:prefs set bool toolkit.policies.perUserDir=true 4. ensure no file at /etc/firefox/policies/policies.json 5. ensure file at: /run/user/$(id -u)/firefox/policies.json 6. close & restart firefox -P and select test profile expected: policy parsed (and applied, if valid) actual: policy not parsed, error logged syslog AVC apparmor="DENIED" operation="open" profile="snap.firefox.firefox" name="/run/user/1002/firefox/policies.json" pid=303974 comm="firefox" requested_mask="r" denied_mask="r" fsuid=1002 ouid=1002 about:policies Error reading JSON file: [Exception... "Component returned failure code: 0x80520015 (NS_ERROR_FILE_ACCESS_DENIED) [nsIXPCComponents_Utils.readUTF8File]" nsresult: "0x80520015 (NS_ERROR_FILE_ACCESS_DENIED)" location: "JS frame :: resource://gre/modules/EnterprisePoliciesParent.sys.mjs :: _readData :: line 614" data: no] workaround for my use case, launching two firefox instances with different settings, abusing test feature: export XPCSHELL_TEST_PROFILE_DIR=magic then configure browser.policies.alternatePath=/etc/firefox/policies/custom.json Not a dupe, the default location /etc/firefox/policies/policies.json works: LP: #1975853 Background on the secondary location: https://bugzilla.mozilla.org/show_bug.cgi?id=1583466 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/2028822/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp