The most likely programs creating overlayfs images in that directory are:
- Podman - Primary suspect; uses
~/.local/share/containers/storage/overlayas default rootless storage - Buildah - Shares the same storage library and location
- Skopeo - Can write to containers/storage
- CRI-O (if configured for rootless) - Uses same storage backend
Why permissions differ:
- Running podman/buildah with
sudo(creates root-owned files) - Interrupted pulls/builds leaving temp files
- User namespace mappings creating files as different subuids
- SELinux context mismatches
To diagnose:
# See what's in the directory
ls -la ~/.local/share/containers/storage/overlay/
# Check which program owns it
lsof +D ~/.local/share/containers/storage/overlay/ 2>/dev/null | head -20
# Check for root-owned files
find ~/.local/share/containers/storage/overlay/ -user root 2>/dev/null | head -10
To fix:
If files are owned by root:
# Run podman unshare to enter user namespace, then fix podman unshare chown -R 0:0 ~/.local/share/containers/storage/overlay/Nuclear option (removes all containers/images):
podman system reset # Or manually: rm -rf ~/.local/share/containers/storage/overlay/If you need to preserve containers:
# Identify and remove only problematic layers podman images # see what's being used podman image prune # remove dangling images
For bwrap specifically - it usually doesn't use this path unless explicitly configured. Check if any apps are using custom bwrap configs that point here.
Would you like me to help diagnose what's actually in your overlay directory?