mirror of
https://github.com/containers/podman.git
synced 2025-06-28 22:53:21 +08:00
volume: apply exact permission of target directory without adding extra 0111
While trying to match permissions of target directory podman adds extra `0111` which should not be needed if target path does not have execute permission. Signed-off-by: Aditya Rajan <arajan@redhat.com>
This commit is contained in:
@ -762,6 +762,18 @@ USER testuser`, fedoraMinimal)
|
||||
|
||||
})
|
||||
|
||||
It("podman run with named volume check if we honor permission of target dir", func() {
|
||||
session := podmanTest.Podman([]string{"run", "--rm", ALPINE, "stat", "-c", "%a %Y", "/var/tmp"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session).Should(Exit(0))
|
||||
perms := session.OutputToString()
|
||||
|
||||
session = podmanTest.Podman([]string{"run", "--rm", "-v", "test:/var/tmp", ALPINE, "stat", "-c", "%a %Y", "/var/tmp"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session).Should(Exit(0))
|
||||
Expect(session.OutputToString()).To(Equal(perms))
|
||||
})
|
||||
|
||||
It("podman volume with uid and gid works", func() {
|
||||
volName := "testVol"
|
||||
volCreate := podmanTest.Podman([]string{"volume", "create", "--opt", "o=uid=1000", volName})
|
||||
|
Reference in New Issue
Block a user