Commit 830604b
fix(storage): drop rootful runroot/graphroot so non-root users default-rootless
Visible in the operator's 18:47 paste at every `wsl -d
podman-MiOS-DEV` entry:
WARN[0000] RunRoot is pointing to a path (/run/containers/storage)
which is not writable. Most likely podman will fail.:
permission denied
Error: cannot evaluate symlinks on DB run root path
"/run/containers/storage": lstat /run/containers/storage:
permission denied
Cause: /etc/containers/storage.conf set:
[storage]
runroot = "/run/containers/storage"
graphroot = "/var/lib/containers/storage"
containers/storage's resolution chain reads /etc/containers/
storage.conf for ALL users, so non-root podman invocations
inherited the rootful paths -- which they cannot read or write
because the dirs are root-owned mode 0700. The WARN fires twice
per `wsl -d` entry (once before the systemd-nspawn entry banner,
once after) because machine-os's bundled startup probes podman
state for display.
Fix: omit `runroot` and `graphroot` from /etc/containers/
storage.conf. containers/storage falls through to per-UID
defaults:
root -> /run/containers/storage + /var/lib/containers/storage
(the exact paths this file used to set explicitly)
non-root -> $XDG_RUNTIME_DIR/containers
+ $HOME/.local/share/containers/storage
(rootless paths, writable by the user)
The other settings in this file (driver=overlay, empty
mount_program, mountopt=nodev,metacopy=on,userxattr) stay; those
are runtime-correct for both user types and are why we have a
custom /etc/containers/storage.conf in the first place (the
ucore-hci base image's mount_program=/usr/bin/fuse-overlayfs
default fails inside WSL2 where /dev/fuse is missing).
Operators who want to override paths still can via their per-user
~/.config/containers/storage.conf -- /etc wins for fields that
ARE set in /etc, but absent fields fall through.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 23594c2 commit 830604b
1 file changed
Lines changed: 26 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
35 | 59 | | |
36 | 60 | | |
37 | 61 | | |
| |||
0 commit comments