> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getprimo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# System file permissions

> Restrict who can read and change the audit configuration, audit records and log files of your Macs, and remove world-writable system folders and applications.

The System file permissions control locks down the files and folders of your Macs that security audits check: the audit configuration, the audit records and the system log files belong to `root`, and no system folder or application stays writable by every user.

## Platform compatibility

| macOS | Windows | Linux | iOS / iPadOS | Android |
| - | - | - | - | - |
| ✅ | | | | |

Requires macOS 15 or later.

## Set up the control

System file permissions takes a single configuration, with no settings to fill in.

**1. Turn on the control**

Go to **MDM** > **Controls**, open **System file permissions**, then click **Turn on**.

**2. Select targeting**

Choose which devices to apply the control to: all macOS devices, specific device groups, or a custom target. Click **Turn on** to deploy it.

## What the control enforces

| Protection | What changes on the Mac |
| - | - |
| **Protect the audit configuration file** | `/etc/security/audit_control` belongs to `root` and `wheel`, with a mode of 440 or stricter and no access control list. |
| **Protect the audit records** | The audit folder belongs to `root` and `wheel` with a mode of 700 or stricter, and each audit record with a mode of 440 or stricter. Access control lists are removed. |
| **Protect system log files** | The log files that macOS rotates belong to `root` and `wheel`, with a mode of 640 or stricter and no access control list. |
| **Block world-writable system folders** | The system folders under `/Library` and `/System` lose write access for every user. |
| **Block world-writable applications** | The apps in `/Applications` lose write access for every user. |

A path that's already compliant isn't changed.

## How it works

Primo runs a script on each Mac and checks the result with a policy. Before it changes a file or folder, the script records its owner, group, mode and access control list, so the control can put them back.

* A folder protected by System Integrity Protection is left as it is. macOS refuses the change, and the Mac shows as failing the policy until the folder is compliant.
* The policy checks that the script ran with the current configuration. A permission changed on the Mac after that isn't detected until the configuration changes.

When you remove the control, Primo puts back every file and folder it changed, as long as nobody changed it since.

## Modify or remove the control

Open the control from **MDM > Controls** to change its targeting, disable it or delete it.

## Related articles

* [Controls overview](https://docs.getprimo.com/mdm/policies/overview.md)
* [Audit policy](https://docs.getprimo.com/mdm/policies/audit-policy.md)
* [Event logging](https://docs.getprimo.com/mdm/policies/event-logging.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.