-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
VOLUME in Dockerfile created with wrong permissions + timestamp #10188
Comments
A friendly reminder that this issue had no activity for 30 days. |
@mheon this looks like the builtin volume is not grabbing the dest directories permissions and setting them. |
|
A friendly reminder that this issue had no activity for 30 days. |
Permission of volume should match the directory it is being mounted on. Fixes: containers#10188 Signed-off-by: Daniel J Walsh <[email protected]>
Permission of volume should match the directory it is being mounted on. Fixes: containers#10188 Signed-off-by: Daniel J Walsh <[email protected]>
Has this really been fixed completely? A slightly modified dockerfile FROM fedora:34
VOLUME /foo
RUN mkdir -p /foo && chown nobody:nobody /foo && ls -ld /foo
RUN ls -ld /foo still loses permissions and ownership attributes
(owner is podman-3.2.3-1.fc34.x86_64 |
This works.
I tried your original Dockerfile, and Docker works the same as podman. Basically the VOLUME is created on the mount point at the time of creation. If the destination directory does not exist, the ownership of the directory, defaults to the current user in the container. If the directory previously exists then the VOLUME will assume the ownership and timestamp of the existing directory. |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
A
VOLUME
within Dockerfile is created with wrong permissions. E.g.and then
docker run ... ls -lad /var/tmp
shows three different modes:Doing the same with moby-engine-19.03.13 shows
I expect the moby-engine behavior:
/vat/tmp
keeps 01777 permsSteps to reproduce the issue:
run 'podman build' with Dockerfile above
start the generated image and look at
/var/tmp
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):The text was updated successfully, but these errors were encountered: