← Back to issue list

bug: run umoci in --rootless mode

View original Github issue

Metadata

Project
rockcraft
Number
#562
Type
issue
State
open
Author
cjdcordeiro
Labels
Created
Updated
Closed

Current evaluation

umoci unpack fails with permission error when Rockcraft runs as nonroot user with --destructive-mode; extract_to() has a rootless param but image.py never passes it, so the bug persists in current code

Suggested action: needs triage

Reason: No labels, no maintainer comments, no assignee after 846 days. The bug is still present: rockcraft/services/image.py:94 calls base_image.extract_to(bundle_dir) without rootless=True, even though oci.py:176-191 already supports the --rootless flag. The issue is a valid, reproducible bug (clear error output and code reference) that simply was never triaged.

Impact: 45 Quick Win: 29.25 Staleness: 80 Complexity: 35 Confidence: 75 Support Request: 10

Issue body

https://github.com/canonical/rockcraft/blob/041e31375a27af9ac74ff31625076f5bdd68c469/rockcraft/oci.py#L185 This is not a problem for lxc-based builds, but when running Rockcraft with a nonroot user and with `--destructive-mode`, the following will happen: > Failed to copy image: Command '['/snap/rockcraft/1907/bin/umoci', 'unpack', '--image', '/home/ubuntu/images/ubuntu:22.04', '/home/ubuntu/bundles/ubuntu-22.04']' returned non-zero exit status 1. (• umoci encountered a permission error: maybe --rootless will help? > ⨯ create runtime bundle: unpack rootfs: chown rootfs: lchown /home/ubuntu/bundles/ubuntu-22.04/rootfs: operation not permitted)

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 45
Quick Win: 29.25
Staleness: 80
Complexity: 35
Confidence: 75
Support Request: 10
needs triage umoci unpack fails with permission error when Rockcraft runs as nonroot user with --destructive-mode; extract_to() has a rootless param but image.py never passes it, so the bug persists in current code
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 20
Confidence: 90
Support Request: 10
needs triage Rockcraft fails with permission errors when running umoci as a non-root user in destructive mode. Suggests adding the --rootless flag to the umoci command. No maintainer response or activity for over two years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 20
Confidence: 85
Support Request: 10
close stale Non-root user running Rockcraft in destructive mode fails when unpacking OCI images with umoci due to permission errors. Suggests adding --rootless flag. No maintainer response or activity for over two years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 20
Confidence: 85
Support Request: 10
needs triage Rockcraft fails when run as non-root in destructive mode because umoci lacks permission to chown rootfs. Suggests adding --rootless flag to umoci. Unaddressed for over two years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 20
Confidence: 75
Support Request: 10
needs triage Rockcraft fails in destructive mode for non-root users because umoci lacks the --rootless flag, triggering permission errors. The report remains open, unassigned, and inactive for over two years, awaiting implementation of the suggested fix.

Update history

No update history recorded yet.

Related issues

No related issues found above the similarity threshold.