-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Hello!
As expected, RPM does not like running as non-root, because it mangles a lot of the permissions in the archives.
However, I'm also seeing a related-but-separate issue wherein the permissions on / get set to 0700, making the container unusable for non-root users.
I fixed it by adding subprocess.check_call(["chmod", "0755", dirpath]) at the end of the archive generation process, which seems like it should always be correct because 0755 is the expected mode for /, but I imagine there are edge-cases I am not thinking of.
Are you still maintaining this repo? Are you open to PRs?
There are also some other issues related to the resulting image having incorrect ctime (epoch time 0) that I might look into.
Lastly, do you have any thoughts on how to ensure that the file ownership inside the image layer is correct? I made some very basic attempts at wrapping the cpio commands with fakeroot, but nothing that bore fruit.