summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorDidier Wenzek <didier.wenzek@free.fr>2022-05-20 11:09:33 +0100
committerDidier Wenzek <didier.wenzek@free.fr>2022-05-20 13:36:47 +0100
commit16eabfb480997cdbfac0d58cf6aa5fb0ea8aeaa4 (patch)
tree4f3e18de58c88779dabf580a1d91d63868b89c09 /docs
parentd9e1597dfb3be8f3945b06f9b61a9d3674b971f0 (diff)
Document behavior on new file download
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
Diffstat (limited to 'docs')
-rw-r--r--docs/src/references/c8y-configuration-management.md16
1 files changed, 7 insertions, 9 deletions
diff --git a/docs/src/references/c8y-configuration-management.md b/docs/src/references/c8y-configuration-management.md
index 1d69b36a..cab49bb4 100644
--- a/docs/src/references/c8y-configuration-management.md
+++ b/docs/src/references/c8y-configuration-management.md
@@ -73,7 +73,11 @@ The `c8y_configuration_plugin` configuration is stored by default under `/etc/te
This [TOML](https://toml.io/en/) file defines the list of files to be managed from the cloud tenant.
Each configuration file is defined by a record with:
* The full `path` to the file.
-* An optional configuration `type`. If not provided, the `path` is used a `type`.
+* An optional configuration `type`. If not provided, the `path` is used as `type`.
+* Optional unix file ownership: `user`, `group` and octal `mode`.
+ These are only used when a configuration file pushed from the cloud doesn't exist on the device.
+ When a configuration file is already present on the device, this plugin never changes file ownership,
+ ignoring these parameters.
```shell
$ cat /etc/tedge/c8y/c8y-configuration-plugin.toml
@@ -81,7 +85,7 @@ files = [
{ path = '/etc/tedge/tedge.toml', type = 'tedge.toml' },
{ path = '/etc/tedge/mosquitto-conf/c8y-bridge.conf' },
{ path = '/etc/tedge/mosquitto-conf/tedge-mosquitto.conf' },
- { path = '/etc/mosquitto/mosquitto.conf', type = 'mosquitto'}
+ { path = '/etc/mosquitto/mosquitto.conf', type = 'mosquitto', user = 'mosquitto', group = 'mosquitto', mode = 0o644 }
]
```
@@ -158,10 +162,4 @@ Note that:
for instance `tedge/configuration_change//etc/tedge/mosquitto-conf/c8y-bridge.conf`.
* Since the type of configuration file is used as an MQTT topic name, the characters `#` and `+` cannot be used in a type name.
If such a character is used in a type name (or in the path of a configuration file without explicit type),
- then the whole plugin configuration `/etc/tedge/c8y/c8y-configuration-plugin.toml` is considered ill-formed.
-
-## Internals
-
-Points that still need to be addressed:
-
-* What if the target file doesn't exist? Is this is an error? If not what user, group and mod are to be used? \ No newline at end of file
+ then the whole plugin configuration `/etc/tedge/c8y/c8y-configuration-plugin.toml` is considered ill-formed. \ No newline at end of file