Set 0o600 permissions for database files

This commit is contained in:
M. Rehan
2022-08-27 00:50:14 +05:00
parent 8381218f69
commit 5b9a0cd91e

View File

@@ -363,6 +363,10 @@ def main():
setup_machine_id = configure_serial = True
# We do not want /data directory to be world readable
# Doing this here is important so that we cover both fresh install and upgrade case
run_command(["chmod", "-R", "u=rwX,g=,o=", f"{root}/data"])
if setup_machine_id:
with contextlib.suppress(FileNotFoundError):
os.unlink(f"{root}/etc/machine-id")