From b96c163c8f06ec338185c9698e9fd66490fa8319 Mon Sep 17 00:00:00 2001 From: Martin Sekera Date: Sun, 30 May 2021 23:40:51 +0200 Subject: [PATCH] chmod rank2 files read-only for owner and no-access for everyone else --- btv | 3 +++ 1 file changed, 3 insertions(+) diff --git a/btv b/btv index 1bf9113..c84665e 100755 --- a/btv +++ b/btv @@ -258,6 +258,9 @@ def serialize(snap, outdir, key, snap_from=None): for file in os.listdir(directory): path = os.path.join(directory, file) os.chown(path, outdir_stat.st_uid, outdir_stat.st_gid) + + if path.endswith(".aes") or path.endswith(".sha512"): + os.chmod(path, 0o100) return 0