Charmcraft crash when snap is used in /tmp directory
Metadata
Current evaluation
Fixed the /tmp PermissionError by switching the Charmcraft snap from strict to classic confinement in merged PR #288 (d49e85e3, 0d76670a).
Resolution: closed resolved
Reason: PR #288 changed the snap from strict to classic confinement, removing the restriction that caused access to /var/lib/snapd/void to fail. It was merged as commit d49e85e3 in merge commit 0d76670a.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Seen today:
```bash
$ pwd
/tmp/charm/
$ charmcraft init
charmcraft internal error! PermissionError: [Errno 13] Permission denied: '/var/lib/snapd/void' (full execution logs in /home/mark/snap/charmcraft/common/charmcraft-log-shi2xw2j)
```
I suspect this is snap confinement doing its job, and we just need to catch the permission error and handle it gracefully.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Fixed the /tmp PermissionError by switching the Charmcraft snap from strict to classic confinement in merged PR #288 (d49e85e3, 0d76670a). | |
| stealth/space-bunny-alpha | — | closed resolved | Charmcraft’s /tmp PermissionError was fixed by switching its snap from strict to classic confinement, merged in PR #288 (0d76670a, d49e85e3). | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Charmcraft crashed with a permission error when run from /tmp due to strict snap confinement. The issue was resolved by switching to classic confinement mode, which removed the restriction. Closed as fixed. | |
| qwen/qwen3.6-35b-a3b | — | — | Resolved by switching the charmcraft snap to classic confinement mode, eliminating the /tmp permission denied error. The issue was closed as the packaging restriction was removed. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without code changes. The /tmp crash stemmed from snap confinement restrictions. The problem was resolved by migrating the charmcraft snap to classic confinement mode, which removes the permission error. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Charmcraft crashed with a permission error when run from /tmp due to strict snap confinement. Resolved by switching the snap package to classic confinement mode, eliminating the restriction. Closed without code changes. |
Update history
No update history recorded yet.
Related work
-
Likely Fixed By:
canonical/charmcraft#288
(confidence 99%)
Merged the strict-to-classic confinement change that resolved the reported snap permission failure.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #380 Charmcraft cannot build or pack from tmp dirs created with tempfile.mkdtemp | charmcraft | closed | Packing failed from tempfile.mkdtemp dirs due to the charmcraft snap's strict confinement (private /tmp mount ns). Fixed by moving the snap to classic confinement in PR #288 (commit d49e85e3), shipped in Charmcraft 1.0.0. | |
| #388 Charmcraft pack cannot run in a CI? | charmcraft | closed | charmcraft's strictly-confined snap blocked CI builds (pip deps install failing). Fixed by switching the snap to classic confinement (PR #288, commit d49e85e3); reporter confirmed the edge classic snap resolved their CI. | |
| #608 charmcraft exiting with 120 exit status and no stdout/stderr | charmcraft | closed | Reporter saw charmcraft exit 120 with no output when run inside a classic snap. Maintainer facundobatista traced it to snapd bug #1849753 (classic snap invoking another classic snap) and closed the issue as not charmcraft-related. | |
| #288 snap: strict -> classic confinement for Charmcraft snap | charmcraft | merged | Merged (commit d49e85e3, merge 0d76670a): switched Charmcraft's snap from strict to classic confinement, added a separate part for core20 Python stage packages, and hardcoded bin/python3 to work around a Snapcraft symlink bug. |