Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions libpod/container_internal_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -3156,6 +3156,10 @@ func (c *Container) relabel(src, mountLabel string, shared bool) error {
logrus.Debugf("Labeling not supported on %q", src)
return nil
}
if errors.Is(err, unix.EPERM) {
currentUID := os.Getuid()
return fmt.Errorf("labeling failed on %q: likely due to a file owned by another user (current user: uid %d) or insufficient permissions: %w", src, currentUID, err)
}
return err
}

Expand Down