From 260b3fce8d16a126bc176827498fdf16e380a441 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Wed, 15 Dec 2021 07:53:09 +0100 Subject: [PATCH] compose: Make sure temporary dirs are world readable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When the temporary directory is created with 0700, other programs (potentially on another host) will have problems reading it. Signed-off-by: Lubomír Sedlář JIRA: RHELCMP-7635 --- pungi/compose.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pungi/compose.py b/pungi/compose.py index f02df9d3..47066807 100644 --- a/pungi/compose.py +++ b/pungi/compose.py @@ -607,7 +607,9 @@ class Compose(kobo.log.LoggingBase): /work/{global,}/tmp[-]/ """ path = os.path.join(self.paths.work.tmp_dir(arch=arch, variant=variant)) - return tempfile.mkdtemp(suffix=suffix, prefix=prefix, dir=path) + tmpdir = tempfile.mkdtemp(suffix=suffix, prefix=prefix, dir=path) + os.chmod(tmpdir, 0o755) + return tmpdir def dump_containers_metadata(self): """Create a file with container metadata if there are any containers."""