diff --git a/examples/pod-with-security-context.yaml b/examples/pod-with-security-context.yaml index c7cfaae36..f191c87ef 100644 --- a/examples/pod-with-security-context.yaml +++ b/examples/pod-with-security-context.yaml @@ -7,7 +7,9 @@ metadata: spec: containers: - name: test - image: busybox + # Jenkins image used for illustration purposes because it has a user + # with uid=1000 and gid=1000 that matches the specified security context + image: jenkins/jenkins command: - /config/test.sh volumeMounts: @@ -39,6 +41,7 @@ metadata: data: test.sh: | #!/bin/sh + id ls -al /test && \ echo 'Hello from local-path-test' && \ cp /config/text.txt /test/test.txt && \ diff --git a/provisioner.go b/provisioner.go index f1d636621..dd408a4cf 100644 --- a/provisioner.go +++ b/provisioner.go @@ -186,7 +186,7 @@ func (p *LocalPathProvisioner) Provision(opts pvController.VolumeOptions) (*v1.P createCmdsForPath := []string{ "mkdir", - "-m", "0770", + "-m", "0777", "-p", } if err := p.createHelperPod(ActionTypeCreate, createCmdsForPath, name, path, node.Name); err != nil {