Replies: 10 comments
-
First thought would be SELinux? |
Beta Was this translation helpful? Give feedback.
-
Thanks @rhatdan I tried to turn off SELinux with [podman@kpgvjriyejdqhoigkgprudqbcy ~]$ getenforce
Enforcing
[podman@kpgvjriyejdqhoigkgprudqbcy ~]$ podman run -dt -p 6379:6379/tcp docker.io/redis
Error: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: rootfs_linux.go:76: mounting "/dat/containers/storage/podman/volumes/0b75c2e026ad9b53d911f8a96b731e2b55dec0f38071e4aa776d81ba084b192d/_data" to rootfs at "/data" caused: operation not permitted: OCI permission denied
[podman@kpgvjriyejdqhoigkgprudqbcy ~]$ getenforce
Permissive
[podman@kpgvjriyejdqhoigkgprudqbcy ~]$ podman run -dt -p 6379:6379/tcp docker.io/redis
Error: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: rootfs_linux.go:76: mounting "/dat/containers/storage/podman/volumes/aaf0919b5487e47b91dd7de3702192b42022ee56413825d786c6efe278998f4a/_data" to rootfs at "/data" caused: operation not permitted: OCI permission denied And just to be sure I tried the two commands you gave, but it also has the same error after trying to do |
Beta Was this translation helpful? Give feedback.
-
Does podman version of podman info work? |
Beta Was this translation helpful? Give feedback.
-
And is /dat directory and its children owned by the podman user? |
Beta Was this translation helpful? Give feedback.
-
I'm not sure what this mean, unless "of" a typo of "or". If that is the case, yes both work. I have the output of both in the first post. The output for
No, everything is root up until the that directory. However I think the permissions of each directory is correct at every level:
and then everything in the final directory seem okay to me. They were all created by trying to run the first redis container:
|
Beta Was this translation helpful? Give feedback.
-
And then going for each level of the path in the error message
And then The owner of the _data directory is suspicious to me Here is the subuid and subgid
postgres is in there from me trying earlier to run a container as the postgres system user which didn't have a home directory at all. Then I created the podman user as a normal user with a home directory. I did manually add entriesof these files for postgres, but did not manually add entries for podman. I suppose they showed up when I created the podman user. |
Beta Was this translation helpful? Give feedback.
-
I tried running Then running
So the hash is different, which is reasonable. But the
|
Beta Was this translation helpful? Give feedback.
-
podman unshare cat /proc/self/uid_map I think something is going wrong in your user namespace. Can you chown the _data directory to be owned by the Podman user. How are you becoming the podman user? |
Beta Was this translation helpful? Give feedback.
-
Right now However my main goal is to eventually have a systemd socket for the daemon owned by this user, so that I can do |
Beta Was this translation helpful? Give feedback.
-
A friendly reminder that this issue had no activity for 30 days. |
Beta Was this translation helpful? Give feedback.
-
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
I think? I've done a lot of searching, and don't see much info on people using
rootless_storage_path
so it could just be me using it wrong. At the very least hopefully this puts more things to search out there on this setting.Description
I'm trying to move rootless container storage to a different drive, but after making that change, I can no longer start containers.
Steps to reproduce the issue:
I left all the uncommented default settings for
storage.conf
but turned onrootless_storage_path
Then I create a directory for a user, in this example the user happens to be named "podman", but I dont think it matters.
sudo install -d -o podman -g podman -m 750 /dat/containers/storage/podman
Then try to start a container
podman run -dt -p 6379:6379/tcp docker.io/redis
Describe the results you received:
Error: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: rootfs_linux.go:76: mounting "/dat/containers/storage/podman/volumes/147d937067e8977b5b1bf9576f18a5845afd652d33e91df94197c994fd8478e3/_data" to rootfs at "/data" caused: operation not permitted: OCI permission denied
Describe the results you expected:
The container to start. It starts fine when I don't have the config change to move the rootless location.
I have also tried to disable SELinux, but it did not change the situation.
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)
I think this is at least very close to the latest version.
For the guide, I feel this is maybe related to https://github.com/containers/podman/blob/main/troubleshooting.md#7-permission-denied-when-running-podman-commands but I'm not sure?
Additional environment details (AWS, VirtualBox, physical, etc.):
AWS
Beta Was this translation helpful? Give feedback.
All reactions