Nodes can save their settings again when settings.json is in a folder they can't write to
TL;DR: In v0.0.127, a node whose settings.json sat in a folder it couldn't write to failed to save settings, and a read-only settings.json could be replaced. From v0.0.128 the first is saved in place and the second is never changed.
v0.0.127 of the edge node agent changed how your node saves settings.json, and that change had two side effects. If the file sat in a folder your node can’t write to, saving failed. If the file itself was read-only, it could be replaced anyway. From v0.0.128 onward, your node saves a file it can write to wherever it sits, and never changes a file it isn’t allowed to write.
What went wrong
- Saves failed in a folder your node can’t write to. A common example is
/var/lib/ee-cdn/settings.jsonin a folder owned by root. Remote settings changes,configureandloginall failed to save there. - A read-only settings.json could be replaced. The same saves could overwrite a file you had made read-only, or one that belongs to another user.
What is true now
- A file in a folder your node can’t write to is saved in place, as it was before v0.0.127.
- A settings.json your node can’t write to is never changed. The save attempt is refused with a message saying the file is read-only, and the file’s contents and permissions are left as they were.
- A save that fails for any other reason, such as a full disk, still leaves the file untouched.
Limits
- Saving in place isn’t done in one step. If your node reloads its settings at that exact moment, it can read a half-written file. A failed write never leaves the file empty.
What you need to do
Update your node to v0.0.128 or later. If you have Remote Config enabled, it will happen automatically.