Unix Permission
Synopsis
Extracts and decodes Unix file permission information.
Schema
- unix_permission:
field: <ident>
target_field: <string>
format: <string>
add_security_notes: <boolean>
add_commands: <boolean>
expand_special: <boolean>
description: <text>
if: <script>
ignore_failure: <boolean>
ignore_missing: <boolean>
on_failure: <processor[]>
on_success: <processor[]>
tag: <string>
Configuration
The following fields are used to define the processor:
| Field | Required | Default | Description |
|---|---|---|---|
field | Y | - | Source field containing Unix permission data (string, int, or array of strings) |
target_field | N | {field}_decoded | Target field to store decoded permission information |
format | N | auto | Input format: auto, octal, symbolic, numeric |
add_security_notes | N | false | Add security risk warnings for dangerous permissions |
add_commands | N | false | Add chmod command examples to output |
expand_special | N | false | Add detailed descriptions for special permission bits |
description | N | - | Explanatory note |
if | N | - | Condition to run |
ignore_failure | N | false | Continue processing if decoding fails |
ignore_missing | N | false | Skip processing if referenced field doesn't exist |
on_failure | N | - | See Handling Failures |
on_success | N | - | See Handling Success |
tag | N | - | Identifier |
disabled | N | false | When true, the processor is skipped and the event continues to the next one. Lets you take a processor out of the path without removing its configuration |
Details
Decodes Unix file permissions from various formats including octal notation (755), symbolic notation (rwxr-xr-x), and decimal values. The processor extracts owner, group, and other permissions along with special permission bits.
The processor supports automatic format detection through the format field set to auto, or explicit format specification using octal, symbolic, or numeric values. Auto-detection analyzes the input pattern to determine the appropriate format parser.
Unix permissions consist of three sets of three bits each: owner (user), group, and other. Each set contains read (r), write (w), and execute (x) permissions. Special bits include setuid, setgid, and sticky bit.
The decoded map always carries octal, decimal, symbolic, description, and a details map. The per-entity breakdowns live under details, not at the top level, and each of them carries five keys, not three:
{
"octal": "755",
"decimal": 493,
"symbolic": "rwxr-xr-x",
"description": "Owner full, others read/execute (standard for executables)",
"details": {
"owner": {"read": true, "write": true, "execute": true, "octal": 7, "symbolic": "rwx", "description": "owner can read, write, execute"},
"group": {"read": true, "write": false, "execute": true, "octal": 5, "symbolic": "r-x", "description": "group can read, execute"},
"other": {"read": true, "write": false, "execute": true, "octal": 5, "symbolic": "r-x", "description": "other can read, execute"}
}
}
description is a lookup against a table of fifteen common modes; anything outside it gets a generated Custom permissions: Owner(...), Group(...), Other(...) string. The optional blocks add keys to the same map — special, security_risk, commands — rather than nesting under it.
When add_security_notes is enabled, the processor adds security_risk — a single string, not a list — together with the booleans world_readable, world_writable and world_executable. A setuid mode that is also world-writable additionally sets dangerous: true and danger_reason.
When add_commands is enabled, the processor adds a commands map with five fixed keys: set_numeric, set_symbolic, add_execute, remove_write and secure_private. All five use the literal filename file, and set_symbolic is built from the regular permission bits only — the special bits are not represented in it.
When expand_special is enabled, the special map gains setuid_desc, setgid_desc and sticky_desc alongside its three booleans. The special map itself is present whenever any special bit is set, with or without this option.
If the input permission data is malformed or contains invalid permission values, the processor will fail unless ignore_failure is set to true.
Examples
Octal Permission Decoding
Decoding octal permission notation... | |
extracts detailed permission breakdown: | |
Symbolic Permission Input
Processing symbolic permission notation... | |
converts to detailed format: | |
Special Permissions
Expanding special permission bits... | |
decodes setuid bit with descriptions: | |
Security Risk Analysis
Adding security warnings for dangerous permissions... | |
includes security risk warnings: | |
Command Generation
Generating chmod commands... | |
includes ready-to-use chmod commands: | |