From b305380447c4319aae75ffda58c547734d57e798 Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Tue, 4 Feb 2020 16:58:24 -0600 Subject: [PATCH] protect data dir by default --- src/utils/createdirs.py | 4 ++++ tests/runtime-result.txt | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/utils/createdirs.py b/src/utils/createdirs.py index 2df87aa3..5c155883 100644 --- a/src/utils/createdirs.py +++ b/src/utils/createdirs.py @@ -18,6 +18,8 @@ along with this program. If not, see . ''' import os +import stat + from . import identifyhome import filepaths home = identifyhome.identify_home() @@ -33,6 +35,8 @@ def create_dirs(): if not os.path.exists(path): os.mkdir(path) + os.chmod(home, stat.S_IRWXU) + from onionrsetup import dbcreator for db in dbcreator.create_funcs: diff --git a/tests/runtime-result.txt b/tests/runtime-result.txt index ce87a18c..ca450f4c 100644 --- a/tests/runtime-result.txt +++ b/tests/runtime-result.txt @@ -1 +1 @@ -1580852476 \ No newline at end of file +1580856998 \ No newline at end of file