Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make the root-downloaded images available to non-root users
DRAFT: DOESN'T WORK YET, the files are not getting the xattr set for some reason # Background The RHEL-AI bootc image contains the ilab container image pre-pulled. This image is downloaded using the `root` user into a container image storage. # Issue Non-root users which try to run the `ilab` wrapper which launches a container using the `ilab` image face a very large pull because as of today, they're not even using the storage root pulls into as an additional image store # Solution Modify the wrapper such that podman will use the root storage configuration. This is achieved through the `CONTAINERS_STORAGE_CONF` environment variable. # Issue 2 Since the storage is populated by the root user, the storage is readable/searchable only by root. # Solution This change runs `chmod a+rx -R /usr/lib/containers` to make the storage directory and its contents accessible to non-root users. However, this has the effect of modifying the permissions of all the in-container files to be world-readable and world-executable. This is not ideal. To overcome this, we modify the `storage.conf` file to set the `force_mask` to "shared" (alias for `0755`) and the `mount_program` to `/usr/bin/fuse-overlayfs`, so that the original in-image file permissions are recorded in the `user.containers.override_stat` xattr.
- Loading branch information