chmod rank2 files read-only for owner and no-access for everyone else

This commit is contained in:
Martin Sekera 2021-05-30 23:40:51 +02:00
parent 00e3baf117
commit b96c163c8f

3
btv
View file

@ -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