The Firefox policy JSON file, typically named policies.json
, is located in specific directories depending on your operating system and whether you want the policy to apply per-installation or system-wide.
Finding Your policies.json
File Location
The exact location for placing the policies.json
file varies by operating system. You need to create a distribution
folder within the Firefox installation directory (if it doesn't exist) and place the policies.json
file inside it. For system-wide policies on Linux, there's an alternative location.
Here's a breakdown of the common locations:
Operating System | Policy Location | Notes |
---|---|---|
macOS | Firefox.app/Contents/Resources/distribution/ |
Inside the Firefox application bundle. |
Linux | firefox/distribution/ |
Inside the Firefox installation directory (varies by distribution). |
Linux (System-wide) | /etc/firefox/policies/ |
An alternative location for system-wide policies. |
Let's look at the details for each operating system:
macOS
On macOS, the policies.json
file is placed inside the Firefox application bundle.
- Navigate to your Applications folder.
- Right-click on the Firefox.app and select "Show Package Contents".
- Go into the Contents folder, then Resources.
- Inside the
Resources
folder, create a new folder named distribution if it doesn't already exist. - Place your
policies.json
file inside thedistribution
folder.
The full path within the application bundle is Contents/Resources/distribution/
.
Linux
For Linux users, the location depends on your distribution and how Firefox was installed.
- Per-Installation: The file goes into a
distribution
folder within the Firefox installation directory. The path looks likefirefox/distribution/
, wherefirefox
is the base of your installation. This directory can vary significantly; common locations might be under/opt/firefox/
or within your home directory if installed manually. - System-Wide: Alternatively, you can specify system-wide policy by placing the file in
/etc/firefox/policies/
. This is a common and often preferred method for applying policies across all users on a system managed by an administrator.
Ensure you have the necessary permissions to create folders and files in these locations.
Creating the distribution
Folder
In most cases, you will need to manually create the distribution
folder within the specified location if it doesn't exist. Make sure the policies.json
file is correctly formatted and placed inside this folder for Firefox to recognize and apply the policies.