aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sos/archive.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/sos/archive.py b/sos/archive.py
index 3fbd7bf8..807c0431 100644
--- a/sos/archive.py
+++ b/sos/archive.py
@@ -215,10 +215,12 @@ class TarFileArchive(FileCacheArchive):
def _build_archive(self):
old_pwd = os.getcwd()
+ old_umask = os.umask(0077)
os.chdir(self._tmp_dir)
tar = tarfile.open(self._archive_path, mode="w")
tar.add(os.path.split(self._name)[1], filter=self.copy_permissions_filter)
tar.close()
+ os.umask(old_umask)
os.chdir(old_pwd)
def _compress(self):