-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Podman run with volume permissions issue - different behavior than Docker #10606
Comments
Does solace-pubsub-standard:9.9.0.28 chown the directory to 777? |
No, it only does a check that user 1000001 inside the container can write to the mounted path Should it do a chown, or chmod? |
Another data point... No existing volumes, create a container, with volume to container path
^ Notice the ownership is root and permissions drwxr-xr-x As soon as I do
^ Notice the ownership changes to the container user 1000001 automatically. I guess my question is, when we pre-create volume using |
I just pulled the image, the directory |
After one year, I still have similar issue on podman 3.4.2. Not sure if it is still the case. |
The current release of Podman is 4.1 |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
I'm migrating from Docker over to Podman. I'm experimenting with rootfull podman. Within the container I'm running, the processes run as user 1000001. First I create a volume, then do a
podman run
with that volume.The container has a check script that checks the user 1000001 inside container can write to the mounted directory path.
This fails with Podman, but passes with Docker.
Steps to reproduce the issue:
sudo podman volume create storage-group
sudo podman run -d --volume storage-group:/var/lib/solace solace-pubsub-standard:9.9.0.28
sudo podman logs solace
and see that permissions issue occurred, and container stoppedDescribe the results you received:
The non-root container user does not have write permission to the mounted directory path at /var/lib/solace
On the host, the Podman volume has the following permissions.
Notice the _data directory is read-only for group and other. If I
chmod 777 /var/lib/containers/storage/volumes/storage-group/_data
, then the issue is resolved and container boots up.Describe the results you expected:
On Docker where this does work, the directory permissions are:
Notice in Docker's case, after running the container, the _data directory is drwxrwxrwx.
Additional information you deem important (e.g. issue happens only occasionally):
I just would like to better understand the behavior difference between Docker and Podman. Or see if this is a bug.
If this is an issue with the container itself I can change the behavior there, but would like guidance on best practices.
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)
No, I haven't tested with latest 3.2.0 version.
Yes, I've read "Can't use volume mount, get permission denied", tried all 3 points, still have issue.
Additional environment details (AWS, VirtualBox, physical, etc.):
AWS EC2 instance running RHEL 8.4
The text was updated successfully, but these errors were encountered: