From cb19425435243e646d3c09ffb72e86d8c04d8cee Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 12 Jun 2020 11:54:37 -0400 Subject: [PATCH] Import media world-readable In the absence of extensions, libarchive assumes ISO content is private. Always make content world readable for the sake of confluent-public serving. --- confluent_server/confluent/osimage.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/confluent_server/confluent/osimage.py b/confluent_server/confluent/osimage.py index 7ef3d0a6..4296d3a0 100644 --- a/confluent_server/confluent/osimage.py +++ b/confluent_server/confluent/osimage.py @@ -175,6 +175,10 @@ def extract_entries(entries, flags=0, callback=None, totalsize=None, extractlist break write_data_block(write_p, buff, size, offset) write_finish_entry(write_p) + if os.path.isdir(str(entry)): + os.chmod(str(entry), 0o755) + else: + os.chmod(str(entry), 0o644) if callback: callback({'progress': float(sizedone) / float(totalsize)})