Skip to content

A listing's userns_mode is asked for as a system permission, but the Podman engine ignores it silently #688

Closed

Description

@reeseroyster

What happens

A listing's compose file may declare userns_mode, and the permission scan treats it as something worth asking the user about:

if (s.userns_mode) add('system', `userns_mode: ${s.userns_mode}`)

But the compose path the apps actually run through (Podman) ignores the key without a word, so the container comes up with the default user namespace and the permission prompt was asking for something that never takes effect.

Evidence

Same compose file, same key, two engines:

services:
  probe:
    image: docker.io/library/alpine:3
    userns_mode: keep-id
    command: sleep 5
engine HostConfig.UsernsMode
Docker via docker-compose keep-id — applied
Podman via docker-compose (rootless socket) private — silently ignored, no warning, container starts fine

docker-compose config keeps the key in both cases, so the file is valid; the difference is entirely in what the engine does with it.

Why it matters

The failure it produces looks like an app bug, not a compose limitation. The pattern people reach for userns_mode: keep-id to fix is an app that cannot write its own folder — rootless Podman maps container uids to subuids, so a file the app owns outside the container is not writable by uid 1000 inside it. The image starts, then dies on attempt to write a readonly database or a permissions error on its config, and nothing in the output hints that the requested namespace was dropped.

Suggestion

Any of these would close it, and I have no strong view which:

  • Refuse it loudly. If the engine cannot honour userns_mode, fail the install with a message naming the key, the way other unsupported keys are handled.
  • Translate it. Pass the equivalent --userns=keep-id (or userns: in the Podman-specific sense) when the engine is Podman.
  • Document it in the listing format reference as unsupported under the shipped engine, and drop it from the permission scan so nobody is asked to approve it.

Worth noting the permission scanner already knows the key exists, so the current state reads as "supported" to anyone writing a listing — which is how I got here.

Activity

  1. calledtoconstruct commented on Nov 21, 2026

    @calledtoconstruct
    Collaborator

    Working to resolve this.

    No open pull request references this issue, and no one has commented that they are working on it.

    This shares the app manager with #804, #688, #138, #679, #528, and #134. They share code and will land in one pull request.

    🤖 Generated with Grok 4.7

  2. calledtoconstruct commented on Nov 21, 2026

    @calledtoconstruct
    Collaborator

    Thank you @reeseroyster. userns_mode is left out of the file that runs, and it is no longer asked for as a system permission. Podman does not apply it. This is on main in #844.

    🤖 Generated with Grok 4.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions