Skip to content

Commit 4dbb0be

Browse files
larsewinickanderson
andcommitted
Added documentation on overriding default directory permissions
Ticket: CFE-4590, ENT-13239 Co-authored-by: Nick Anderson <[email protected]> Signed-off-by: Lars Erik Wik <[email protected]>
1 parent 85d57b2 commit 4dbb0be

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

content/reference/components/cf-agent.markdown

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,6 +1072,47 @@ body agent control
10721072

10731073
**See also:** [`default:control_agent.nonalphanumfiles`](/reference/special-variables/control_agent/#defaultcontrol_agentnonalphanumfiles)
10741074

1075+
### default_directory_create_mode
1076+
1077+
**Description:** Override the default 0700 permissions when `cf-agent` creates
1078+
parent directories during file promise repairs.
1079+
1080+
The `default_directory_create_mode` attribute in body agent control enables
1081+
users to specify custom permissions (e.g., 0755) for automatically created
1082+
directories, avoiding the need for explicit perms promises on each parent
1083+
directory when deeper paths are required.
1084+
1085+
This addresses cases where files need broader access permissions but
1086+
their auto-created parent directories would otherwise default to 0700,
1087+
making the files inaccessible despite having correct permissions.
1088+
1089+
The mode string may be symbolic or numerical, like `chmod`.
1090+
1091+
**Type:** `string`
1092+
1093+
**Default value:** `0700`
1094+
1095+
**Example:**
1096+
1097+
```cf3
1098+
body agent control {
1099+
# Override the default directory create mode to 0755 (it defaults to 0700 if
1100+
# not specified)
1101+
default_directory_create_mode => "a+rx"; # Can also use octets 0755
1102+
}
1103+
```
1104+
1105+
**History:**
1106+
1107+
- Added in 3.28.0
1108+
1109+
**Notes:**
1110+
1111+
Please note that modifying this value will affect your entire policy and can
1112+
lead to security vulnerabilities.
1113+
1114+
**See also:** `filestat()`, [`body perms mode`](/reference/promise-types/files#mode), [`default:control_agent.default_directory_create_mode`](/reference/special-variables/control_agent/#defaultcontrol_agentdefault_directory_create_mode)
1115+
10751116
### refresh_processes
10761117

10771118
**Description:** The `refresh_processes` slist contains bundles to reload

content/reference/special-variables/control_agent.markdown

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,12 @@ Determines whether to warn about filenames with no alphanumeric content. This te
157157

158158
**See also:** [`nonalphanumfiles` in `body agent control`][cf-agent#nonalphanumfiles]
159159

160+
### default:control_agent.default_directory_create_mode
161+
162+
Determines the default directory permissions when `cf-agent` creates parent directories during `files` promise repairs.
163+
164+
**See also:** [`default_directory_create_mode` in `body agent control`][cf-agent#default_directory_create_mode]
165+
160166
### default:control_agent.refresh_processes
161167

162168
Contains bundles to reload the process table before verifying the bundles named in this list (lazy evaluation).

0 commit comments

Comments
 (0)