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 |
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.
When add_security_notes is enabled, the processor analyzes permission combinations and adds security risk warnings to the output. Dangerous permission patterns like world-writable files (777) or setuid binaries with write permissions trigger security advisories.
When add_commands is enabled, the processor generates chmod command examples in the output, providing ready-to-use Unix commands for setting the decoded permissions.
When expand_special is enabled, the processor adds detailed descriptions for special permission bits (setuid, setgid, sticky bit), explaining how these bits affect file and directory behavior in Unix systems.
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: | |