-
Notifications
You must be signed in to change notification settings - Fork 83
Open
Description
When a user runs rootless podman without a proper login session, image pull fails with:
unpacking failed (error: exit status 1; output:
potentially insufficient UIDs or GIDs available in user namespace (requested 0:42 for /etc/gshadow):
Check /etc/subuid and /etc/subgid if configured locally and run "podman system migrate": lchown /etc/gshadow: invalid argument)
Even though it says "potentially", we can perhaps improve the error message in cases where the subuid/subgid mappings exist for the user. This happens when fchownat fails with EINVAL:
container-libs/storage/pkg/chunked/filesystem_linux.go
Lines 175 to 177 in e70c309
| if errors.Is(err, syscall.EINVAL) { | |
| return fmt.Errorf(`potentially insufficient UIDs or GIDs available in the user namespace (requested %d:%d for %s): Check /etc/subuid and /etc/subgid if configured locally and run "podman system migrate": %w`, uid, gid, path, err) | |
| } |
We could check for a user session similar to what c/common does(bus check) before printing an error message that instead suggests running loginctl enable-linger <uid> as the fix.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels