From 1789fb1ed4effd739091b1eb0331076a914e4366 Mon Sep 17 00:00:00 2001 From: Vincent Zeng Date: Thu, 22 Mar 2018 16:27:35 -0400 Subject: [PATCH] chmod 700 to backup tempdir --- ttbp/core.py | 1 + ttbp/ttbp.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ttbp/core.py b/ttbp/core.py index 3b9730a..98df199 100644 --- a/ttbp/core.py +++ b/ttbp/core.py @@ -500,6 +500,7 @@ def process_backup(filename): if not os.path.exists(backup_path): subprocess.call(["mkdir", backup_path]) + subprocess.call(["chmod", "700", backup_path]) subprocess.call(["tar", "-C", backup_path, "-xf", filename]) backup_entries = os.path.join(backup_path, "entries") diff --git a/ttbp/ttbp.py b/ttbp/ttbp.py index 8a747c0..590af71 100644 --- a/ttbp/ttbp.py +++ b/ttbp/ttbp.py @@ -817,7 +817,7 @@ please enter""") if not os.path.exists(config.BACKUPS): subprocess.call(["mkdir", config.BACKUPS]) subprocess.call(["cp", backupfile, config.BACKUPS]) - print("\nbackup saved!") + print("\nbackup saved! i also put a copy at {backup_dir} for you.".format(backup_dir = config.BACKUPS)) else: print(""" sorry, something went wrong! please try to address the error and try again.