Description of problem:
When the system umask is set to 0077 for STIG compliance, disk2mirror skips uploading of OCP release images
Version-Release number of selected component (if applicable):
oc-mirror 4.18.9 v2
How reproducible:
100%
Steps to Reproduce:
1.Mirror 2 disk with umask 0077 2.Disk 2 mirror with umask 0077 3.
Actual results:
oc-mirror skips pushing the OpenShift release images
Expected results:
oc mirror handles the bad umask or alerts the user that the umask setting is invalid
Additional info:
The RHEL STIGs require that the system umask be 0077. In oc-mirror v1, a umask of 0077 would cause the operator index and graph images to have bad file permissions inside the containers that would then fail to run in OpenShift. oc-mirror v2 skips the release image push when the umask is 0077 with this output 2025/04/25 09:38:54 ^[[1;94m [INFO] ^[[0m : 🔀 workflow mode: mirrorToDisk 2025/04/25 09:38:55 ^[[1;94m [INFO] ^[[0m : 🕵 going to discover the necessary images... 2025/04/25 09:38:55 ^[[1;94m [INFO] ^[[0m : 🔍 collecting release images... 2025/04/25 09:39:14 ^[[1;94m [INFO] ^[[0m : 🔍 collecting operator images... 2025/04/25 09:40:06 ^[[1;94m [INFO] ^[[0m : 🔍 collecting additional images... 2025/04/25 09:40:06 ^[[1;94m [INFO] ^[[0m : 🔍 collecting helm images... 2025/04/25 09:40:06 ^[[1;94m [INFO] ^[[0m : 🔂 rebuilding catalogs 2025/04/25 09:40:06 ^[[1;94m [INFO] ^[[0m : 🚀 Start copying the images... 2025/04/25 09:40:06 ^[[1;94m [INFO] ^[[0m : 📌 images to copy 194 2025/04/25 09:41:36 ^[[1;94m [INFO] ^[[0m : === Results === 2025/04/25 09:41:36 ^[[1;94m [INFO] ^[[0m : ^[[1;92m ✓ ^[[0m 190 / 190 release images mirrored successfully 2025/04/25 09:41:36 ^[[1;94m [INFO] ^[[0m : ^[[1;92m ✓ ^[[0m 4 / 4 operator images mirrored successfully 2025/04/25 09:41:36 ^[[1;94m [INFO] ^[[0m : 📦 Preparing the tarball archive... 2025/04/25 09:44:49 ^[[1;94m [INFO] ^[[0m : mirror time : 5m53.611617929s 2025/04/25 09:44:49 ^[[1;94m [INFO] ^[[0m : 👋 Goodbye, thank you for using oc-mirror