Usually, files in /etc are written with root as owner and possibly a group with group readable permission.
I think something like
host.write_file( config_path, f.getvalue().encode("UTF-8"), owner=root, group=TELEGRAF_USER, perms=0o640, )
is more on par with what we expect in /etc. (0o440 is a possibility if we really want to discourage people to edit the files)
However, I may miss something. Not a hard block, just something I'm curious about.
« Back to merge proposal
Usually, files in /etc are written with root as owner and possibly a group with group readable permission.
I think something like
host.write_file(
config_ path,
f. getvalue( ).encode( "UTF-8" ),
owner= root,
group= TELEGRAF_ USER,
perms= 0o640,
)
is more on par with what we expect in /etc.
(0o440 is a possibility if we really want to discourage people to edit the files)
However, I may miss something.
Not a hard block, just something I'm curious about.