Default Permissions
During installation, themiru system user and group are created (no login shell). The agent process runs as miru:miru under systemd.
By default, the agent creates and owns the following directories:
| Path | Purpose |
|---|---|
/var/lib/miru | Agent state, credentials, device identity |
/var/log/miru | Log files (hourly rotation) |
/srv/miru | Deployed configuration instance files |
/srv/miru is supported out-of-the-box, no additional configuration required.
Custom File Paths
The Miru Agent supports writing config instances to arbitrary file system paths. Some examples include:/etc/myapp/configs/mobility.json/home/myapp/configs/communication.yaml/var/lib/myapp/configs/safety.yaml
miru user access to the specified target path. Otherwise, the Miru Agent will receive a permission denied error from the operating system when attempting to write to these file paths.
Required Permissions
To write to a given file, themiru user requires specific permissions to
- The file itself
- The directories along the path to the file
/var/lib/myapp/configs/planning.yaml as an example. The required read and write permissions to grant the miru user access to this file are shown in the table below.
| Path | Permissions |
|---|---|
/var/lib/myapp/configs/planning.yaml | read (r), write (w) |
/var/lib/myapp/configs | read (r), write (w), execute (x) |
/var/lib/myapp | execute (x) |
/var/lib | execute (x) |
/var | execute (x) |
miru user requires the following Unix permissions:
-
Read (
r) and write (w) access to the file itselfr(read) is required to read the file contents.w(write) is required to write the file contents.
If the file does not yet exist, you can ignore this permission. The agent will create it with the appropriate permissions. -
Read (
r), write (w), and execute (x) access to the file’s parent directoryr(read) is required to scan files within the directory.w(write) is required to create/replace directory entries (e.g., temp file + rename for atomic writes).x(execute/search) is required to access files within the directory.
-
Execute (
x) access to all directories along the path to the filex(execute) is required to access directories within the path to the file.
Many directories, such as/var/lib, are world-readable by default and need no special permissions. Other directories, such as/home/myapp, will not grantmiruuser access by default and must be specifically configured.
Testing access
To help you navigate the necessary permissions, we’ve provided an automated script that reports any gaps in the permissions for themiru user to access a given file or directory.
Run the script
First, download the script to your current working directory usingcurl.
less.
You can also view the script on GitHub.
Understand the output
The script outputs a table of the permissions required to access the target path. Each row shows a path unit (file, directory, parent, ancestor) and required permissions.
-means that permission is not required for that path unitOKmeans the required permission is presentNOmeans the required permission is missing
FINAL RESULT: PASS or FINAL RESULT: FAIL.
Example outputs
- Existing File
- File doesn't exist
- Directory
To test an existing file, run the script with the file path as an argument.
Granting access
Once you’ve determined the necessary permissions, you need to grant them to themiru user. There are two common methods for granting the miru user access to a given path:
- Standard Unix permissions - basic owner/group/other mode bits on a file or directory
- ACLs - per-user or per-group access rules beyond mode bits
miru user or group the required permissions.
Standard Unix permissions
For standard Unix permissions, there are two approaches we recommend:- Grant the
mirugroup the appropriate permissions - Transfer ownership to the
miruuser
miru group the appropriate permissions instead of transferring ownership to the miru user.
Files
- Transfer ownership
- Group access
chown mirusetsmiruas the file owner user (group unchanged)chmod u+rwgives the owner (miru) read and write access
- Transfer ownership
- Group access
chown mirusetsmiruas the owner user for the directory and its contentschmod u+rwxgives the owner (miru) read, write, and execute access
ACLs
When you cannot change the ownership or the group of a path (e.g., a directory shared between multiple services), use POSIX Access Control Lists (ACLs) for fine-grained permission control. ACLs require theacl package. If setfacl is not available, install it with:
miru user read and write access to a file.
miru user read/write/execute access to a directory.

