# The audit streams

"Who did that, and when?" is asked about administrators more sharply than about users. The server keeps several records that answer it, each for one kind of change. This page lists them: what each holds, where it is, and who may read it.

| Record | Holds | Is |
|---|---|---|
| [the access audit log](#the-access-audit-log) | what the access rules decided: roles given, tokens issued, actions refused | `rbac_audit.log` |
| [the user audit file](#the-user-audit-file) | every change to a user, field by field | `logs/audit/user.log` |
| [admin changes in the activity record](#admin-changes-in-the-activity-record) | every admin command that changes something, with before and after | the record that reports read |
| [the change log of a job](#the-change-log-of-a-job) | what was changed in a job, by whom | inside each job |
| [audit events for a SIEM](#audit-events-for-a-siem) | the same happenings, sent off the machine as they happen | a log target |

## The access audit log

`rbac_audit.log`, beside the server's log. One line per event, with tabs between eight values:

```
2026-11-20 17:21:11.542	role.save	MainUsers/crushadmin	access.roles.edit	role help-desk	allowed		127.0.0.1
2026-11-20 20:08:57.318	deny	MainUsers/alex		api me.shares.create	refused	forbidden: ERROR : Permission denied! Path: /Reports/	127.0.0.1
```

| Value | Is |
|---|---|
| time | to the millisecond |
| event | what happened: `role.save`, `token.issue`, `deny`, `job.refused`, `job.unverified` … |
| actor | who, as connection group and name. For a token: its label and whose it is. |
| permission | the permission that was asked for |
| target | on what: a role, a user, a job, a command |
| decision | `allowed` or `refused` |
| reason | why it was refused |
| ip | from where |

The two lines above are from a test server: an administrator saved the role "help-desk", and later a user was refused a share of a folder they may not share.

What is in it:

- roles made, changed and deleted, and who was given which;
- tokens issued, used and revoked;
- every admin action the access rules **refused**, with the permission that was missing;
- jobs that were refused for a missing or broken signature, and jobs that ran without one: see [Approvals](Jobs-Approvals.md).

It never holds a secret: addresses are written without their passwords, tokens by their id and label only.

The file is rolled at 10 MB, and five old files are kept: `rbac_audit.log.1` to `.5`. A server with many refusals fills that in weeks. For keeping longer, send the events away: see below.

**Who may read it.** A full administrator, and a holder of the role **Auditor**. The file is closed to every other way in: it cannot be reached through a user's folders or a job. See [Roles and access](Security-Roles.md).

## The user audit file

`logs/audit/user.log`. Every time a user is saved in the [User Manager](Users.md), the server writes who did it, from where, and each field that changed, with its new and its old value:

```
11/20/2026 19:38:17.782:MODIFIED_BY:crushadmin:WITH_IP:127.0.0.1
11/20/2026 19:38:17.782:COMMENT:
11/20/2026 19:38:17.782:SETTINGS:users/MainUsers/bob new
11/20/2026 19:38:17.782:users/MainUsers/bob:root_dir, new=/ old=null
11/20/2026 19:38:17.782:users/MainUsers/bob:username, new=bob old=null
11/20/2026 19:38:17.782:users/MainUsers/bob:password, new=********* old=*********
```

Passwords are starred out. A save that failed is noted too, as `FAILED_UPDATE`.

| Server setting | Does | Unless you change it |
|---|---|---|
| `write_separate_audit_log_user` | writes this file | true |
| `write_separate_audit_log_user_comment_required` | an administrator must give a reason with every save of a user. The reason is the `COMMENT` line. | false |

With the second setting on, the User Manager asks for a comment at **Save**. That is the simple way to tie every change of an account to a ticket number.

The file is not rolled and not deleted by the server. It grows by a few lines per change; archive it with your logs.

## Admin changes in the activity record

The record that [Reports](Reports.md) read keeps every admin command that changes something, as an event of the kind **admin**: who, from where, which command, on what, and the values before and after. Secrets are masked.

It is the most useful of the five for looking things up, because it can be searched and counted:

| To see | Use |
|---|---|
| everything administrators changed, with before and after, and refused commands | the report **Admin audit** |
| accounts created, changed and deleted | the report **Account changes** |
| who logged in as an administrator, and who tried | the report **Admin logins** |
| what the access rules refused, by user and permission | the report **Refused by access rules** |
| all of it for one person | the report **Audit trail** |
| a question of your own | [Explore](Reports-Explore.md), dataset **admin** |

Kept for three years unless you change it, with an integrity chain that shows whether an old day was altered: [The data](Reports-Data.md#integrity).

Whether before and after are kept is the switch **Admin changes with before and after** in [Preferences, Reporting](Prefs-Reporting.md#recording).

## The change log of a job

Each job keeps its own list of what was changed in it, while **Audit job changes** is on: see [The change log and audit](Jobs-Change-Log.md). The alert **Job Changes** sends a mail at each change.

## Audit events for a SIEM

A [log target](Prefs-Logging-Targets.md) in a SIEM format sends, among its five kinds of events:

- **Admin changes and access audit**: every admin command that changes something, and every line of the access audit log;
- **Bans, kicks, alerts, refused access**: what was refused.

That puts the audit trail on another machine the moment it happens, where an administrator of the file server cannot reach it. For a server under an audit rule, this is the record to rely on. See [SIEM formats](Logging-SIEM.md).

## Which to use for what

| Question | Look in |
|---|---|
| Who gave Anna the role, and when? | the access audit log |
| Who changed Bob's home folder last Tuesday, and from what? | the user audit file, or the report Account changes |
| Was anything changed on the server in the night of the incident? | the report Admin audit, for that night |
| Why was my script refused? | the access audit log: the `deny` line names the permission |
| Can we prove nobody altered the trail? | the events in the SIEM, and the integrity chain of the record |

## Things to know

- **The server's log has it too**, as lines among all the others. The audit records are the same facts, sorted out.
- **Changes outside the server are in none of them.** Somebody who edits a file of the server on its disk leaves no line. Protect the machine and its backups: see [Hardening](Security-Hardening.md).
- **Time and names.** All records carry the server's time and the name the administrator logged in with. Shared admin accounts make every one of these records worthless: give each administrator their own.
- **For a review**, the four "evidence" dashboards of the Reports app collect the usual questions: [Home](Reports-Home.md).
