Skip to content

Commit 0635e22

Browse files
committed
settings/syntax: Describe effect of %variables better
1 parent 842a8ce commit 0635e22

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

docs/core/settings/syntax.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,8 @@ However, you must be careful with the ordering of these in the configuration
436436
file, because the `$SET:variables` are expanded immediately while parsing the
437437
config file and they're not updated later.
438438

439+
See also [[link,settings_variables]].
440+
439441
## Environment Variables
440442

441443
It is possible use `$ENV:name` to expand values from environment.
@@ -447,3 +449,9 @@ Note that these are also Case Sensitive.
447449

448450
These can also be used for external config files, but you need to list them in
449451
[[setting,import_environment]] so that processes can see them.
452+
453+
For [[link,settings_types_file]] it is better to use $ENV: instead of %{env:}.
454+
This is because with $ENV: the expansion and file reading is done by the config
455+
process, which normally runs as root. With %{env:} the expansion is delayed
456+
until the process accessing the setting expands it, but the process may not
457+
have enough permissions to open the file.

docs/core/settings/types.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,10 @@ setting by using `inline:` prefix in the value. For example userdb could be
186186
returning `crypt_global_public_key_file=inline:<public key content>` without
187187
having to use files.
188188

189+
If you use `%{variables}` in file names, the expansion is delayed until the
190+
process accessing the setting expands it, but the process may not have enough
191+
permissions to open the file.
192+
189193
## Named Filter
190194

191195
The settings inside the filter are used only in a specific situation. See

0 commit comments

Comments
 (0)