diff --git a/drivers/chown_unix.go b/drivers/chown_unix.go index 7c2a73f6b8..36e3b23c01 100644 --- a/drivers/chown_unix.go +++ b/drivers/chown_unix.go @@ -49,7 +49,7 @@ func platformLChown(path string, info os.FileInfo, toHost, toContainer *idtools. } if uid != int(st.Uid) || gid != int(st.Gid) { cap, err := system.Lgetxattr(path, "security.capability") - if err != nil && err != system.ErrNotSupportedPlatform { + if err != nil && !errors.Is(err, system.EOPNOTSUPP) && err != system.ErrNotSupportedPlatform { return fmt.Errorf("%s: %v", os.Args[0], err) }