Where are the policies located in Linux when running Brave in Flatpak

Hi, I have a question. Where do I have to put the json policy file in Linux, when using Brave in Flatpak?

Hi, yes I am also interested in this question. Ive tried all sorts of different paths in the flatpak /var/ directory, such as /etc/brave/policies/managed/policy.json, but I haven’t gotten it to work.

I stopped using Brave via flatpak (I don’t remember what kind of problems I encountered), but the install path is /var/lib/flatpak/app/com.brave.Browser/

You can see on brave://policy

In brave://policy/logs can see logs like [VERBOSE] Skipping mandatory platform policies because no policy file was found at: /etc/brave/policies/managed

You can use the find command on terminal in flatpak path to find a json file.

Sorry, yes I put several files such as policy.json, policies.json, in this path. /var/lib/flatpak/app/com.brave.Browser/x86_64/stable/67e7b1a7c4ce5baccfafc298f9514a38d37df8bb870f3f288e739167dc56c3f2/files/etc/brave/policies/managed/
However it still says " * [VERBOSE] Skipping mandatory platform policies because no policy file was found at: /etc/brave/policies/managed"
I am trying to do a URL blocklist and I believe I have the correct flatpak path so I am not sure why it isn’t working. If you have any advice that would be greatly appreciated. Thank you
{
“URLBlocklist”: [ “https://www.brave.com/” ]
}

Still no answer. I also asked on Brave Flatpak

If only there was a help article about it. Oh wait, there is! https://support.brave.app/hc/en-us/articles/360039248271-Group-Policy

Should also point out what is stated at https://brave.com/linux/

While it is maintained by Brave Software, it is not yet working as well as our native packages

Oh wait, that help is NOT about flatpak (files are in sandbox are located in the flatpak cont)

Even though your last post is a month old or so, I’ll try to give a valid answer. Maybe it helps some others that come across this topic when using search.

The only way I got policies working with flatpak sandboxed Brave is:

  1. Close Brave and make sure it is not running in background.
  2. Create the files as the documentation tells you to do. So # mkdir -p /etc/brave/policies/managed/. Make sure to have root privileges.
  3. Create a JSON file there, I choose policy.json. Make sure to edit it using root privileges again and set your policy rules there.
  4. Set the flatpak file system permissions right, so that Brave can access these files from its sandbox. You can either use a graphical tool like “Flatseal” or just issue the following command: # flatpak override com.brave.Browser --filesystem=“/etc/brave/policies/managed". Depending on your flatpak configuration you might have to have root privileges again or add --user if it’s a user installed flatpak.
  5. Start Brave again and make sure the policy is set in brave://policy

That did the trick for me.