diff --git a/pkg/yqlib/chown_linux.go b/pkg/yqlib/chown_linux.go index 3913662b..174a7948 100644 --- a/pkg/yqlib/chown_linux.go +++ b/pkg/yqlib/chown_linux.go @@ -12,7 +12,14 @@ func changeOwner(info fs.FileInfo, file *os.File) error { if stat, ok := info.Sys().(*syscall.Stat_t); ok { uid := int(stat.Uid) gid := int(stat.Gid) - return os.Chown(file.Name(), uid, gid) + + err := os.Chown(file.Name(), uid, gid) + if err != nil { + // this happens with snap confinement + // not really a big issue as users can chown + // the file themselves if required. + log.Info("Skipping chown: %v", err) + } } return nil } diff --git a/release_notes.txt b/release_notes.txt index 0b697eee..3cc78097 100644 --- a/release_notes.txt +++ b/release_notes.txt @@ -1,3 +1,7 @@ +4.30.8: + - Log info message when unable to chown file in linux (e.g. snap confinement) #1521 + + 4.30.7: - Fixed bug in splice operator #1511 - Fixed value operator bug #1515