From 260b3fce8d16a126bc176827498fdf16e380a441 Mon Sep 17 00:00:00 2001 From: Lubomír Sedlář Date: Dec 17 2021 07:10:48 +0000 Subject: compose: Make sure temporary dirs are world readable 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 --- diff --git a/pungi/compose.py b/pungi/compose.py index f02df9d..4706680 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."""