tari
tari copied to clipboard
[base node] base_node ids permission checks
Describe the bug If the base_node id json files are not set to 0600, then base_node exits with an error.
ExitError { exit_code: ConfigError, details: Some("./tari/esmeralda/config/base_node_id_esmeralda.json has incorrect permissions. You can update the identity file with the correct permissions using 'chmod 600 ./tari/esmeralda/config/base_node_id_esmeralda.json', or delete the identity file and a new one will be created on next start") }
10:25 ERROR Exiting with code (101): ExitError { exit_code: ConfigError, details: Some("./tari/esmeralda/config/base_node_id_esmeralda.json has incorrect permissions. You can update the identity file with the correct permissions using 'chmod 600 ./tari/esmeralda/config/base_node_id_esmeralda.json', or delete the identity file and a new one will be created on next start") }
Do we need write permission to these files? If these files do not exist, then the application would need write access to the parent folder?
If the file perms are 0600, but owner by a user that is not the current running user, we get an OS perms error, but could have more detail, like the location of the files that throw the error, vs the description of files
ERROR Could not create new node id. Operation not permitted (os error 1).
ExitError { exit_code: ConfigError, details: Some("Could not create new node id. Operation not permitted (os error 1).") }
Feature request, can we add an option to override the error and just log as warning? Deploying base_node into kubernetes
and storing the ID files as secrets, has the files as symbolic links
in the file system. I have a work around, but this has some caveats.
Desktop (please complete the following information):
- Raspberry Pi 4 - Debian Bullseye
- Tari Suite - v0.50.0-pre.0