summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2020-07-27 13:33:27 -0400
committerMatthew Heon <matthew.heon@pm.me>2020-07-31 11:38:20 -0400
commit5d790bb2be77fae2de429d1004bec5fed0c55ba8 (patch)
tree5440d73fe27685d55189bed425a97ed173c36778
parentae34c6386019d77a92de2e7085f0c4c1f04a09cf (diff)
downloadpodman-5d790bb2be77fae2de429d1004bec5fed0c55ba8.tar.gz
podman-5d790bb2be77fae2de429d1004bec5fed0c55ba8.tar.bz2
podman-5d790bb2be77fae2de429d1004bec5fed0c55ba8.zip
When chowning we should not follow symbolic link
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
-rw-r--r--libpod/container_internal.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go
index c44ba5fe6..e277a88c5 100644
--- a/libpod/container_internal.go
+++ b/libpod/container_internal.go
@@ -1544,7 +1544,7 @@ func (c *Container) chownVolume(volumeName string) error {
if err != nil {
return err
}
- if err := os.Chown(path, uid, gid); err != nil {
+ if err := os.Lchown(path, uid, gid); err != nil {
return err
}
return nil