match serialized bin permissions with containing directory
This commit is contained in:
parent
d0ac4394e7
commit
454c006901
2 changed files with 10 additions and 2 deletions
10
btv
10
btv
|
@ -230,7 +230,15 @@ def serialize(snap, outdir, key, snap_from=None):
|
|||
with open("check-integrity.sh", "w") as f:
|
||||
f.write("#! /bin/sh\n\nsha512sum --check manifest.sha512\n")
|
||||
|
||||
os.chmod("check-integrity.sh", 0o500)
|
||||
## fix permissions and ownership of created objects
|
||||
os.chmod("check-integrity.sh", 0o555)
|
||||
|
||||
outdir_stat = os.stat(outdir)
|
||||
os.chown(directory, outdir_stat.st_uid, outdir_stat.st_gid)
|
||||
|
||||
for file in os.listdir(directory):
|
||||
path = os.path.join(directory, file)
|
||||
os.chown(path, outdir_stat.st_uid, outdir_stat.st_gid)
|
||||
|
||||
return 0
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[Unit]
|
||||
Description=Do a filesystem snapshot, optionally offsite backup
|
||||
Description=Filesystem snapshot (with offsite backup)
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue