summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAditya Rajan <arajan@redhat.com>2021-12-07 15:08:52 +0530
committerMatthew Heon <mheon@redhat.com>2021-12-08 13:34:55 -0500
commitdb9caa74b79482b362aab180054e69a08c10d3cd (patch)
tree0c01f426d9806fc11ab66438ec2d245c160bb491 /test
parent2d7c4beffc38f72a49ae2e9d360d8ecc46ea76c5 (diff)
downloadpodman-db9caa74b79482b362aab180054e69a08c10d3cd.tar.gz
podman-db9caa74b79482b362aab180054e69a08c10d3cd.tar.bz2
podman-db9caa74b79482b362aab180054e69a08c10d3cd.zip
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>
Diffstat (limited to 'test')
-rw-r--r--test/e2e/run_volume_test.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/e2e/run_volume_test.go b/test/e2e/run_volume_test.go
index 59937b6c0..eca43680b 100644
--- a/test/e2e/run_volume_test.go
+++ b/test/e2e/run_volume_test.go
@@ -691,6 +691,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})