Skip to content
General ITAdvanced

Podman Compose Exec Permission Denied: How to Troubleshoot the crun oom_score_adj Error

Quick Answer The Podman Compose error crun: write to /proc/self/oom_score_adj: Permission denied: OCI permission denied can occur because of an incompatibili...

BI
Bison Technical Team Enterprise IT specialists
Updated 27 min read 2 total views
Structured technical guidanceSafety notes included where requiredSources cited when applicable

Quick Answer

The Podman Compose error crun: write to /proc/self/oom_score_adj: Permission denied: OCI permission denied can occur because of an incompatibility between Podman, the crun OCI runtime, and the Docker-compatible API used by Docker Compose, particularly when running rootless containers through a systemd-managed Podman service.

A closely matching software defect has been identified in the official Podman development repository. Under certain conditions, Podman passes an OOM score adjustment value to crun during an exec operation that the rootless runtime does not have permission to apply.

Advertisement

A correction has been merged into the Podman v6.2 development branch through Podman pull request #30253.

The recommended approach is to verify the installed Podman and crun versions, test direct execution against the Compose-created container, inspect the Podman API service, and determine whether an updated package containing the upstream correction is available.

Possible temporary workarounds include using direct podman exec commands or switching the Compose provider from Docker Compose to podman-compose. These workarounds must be tested against the affected environment.

Symptoms of the Podman Compose Exec Error

The problem occurs when a container starts successfully through Podman Compose, but an attempt to execute an additional command inside that running container fails.

The following error may appear:

Error: crun: write to `/proc/self/oom_score_adj`: Permission denied: OCI permission denied
Error: executing /run/current-system/sw/bin/docker-compose exec main hostname: exit status 126

Common characteristics of the reported problem include:

  • Containers start successfully using podman compose up.
  • The containers remain in a running state.
  • Commands executed using podman compose exec fail.
  • Containers created directly using podman run support normal command execution.
  • The same Compose configuration works with Docker Engine.
  • Podman Compose uses Docker Compose as its external Compose provider.
  • The error references crun and the Linux oom_score_adj process attribute.
  • The execution attempt returns exit status 126.

This combination of symptoms suggests that the problem may involve the container runtime or API execution environment rather than the application installed inside the container.

Reported Environment

The issue has been reported with the following software configuration:

Component Reported Configuration
Operating system NixOS
Podman 6.1.4
Docker Compose 5.7.1
Docker Engine 29.9.3
OCI runtime crun
crun version Not specified
Container image Alpine Linux
Compose provider Docker Compose
Podman execution mode Apparently rootless; requires verification
Error exit status 126

These versions describe the reported environment and do not constitute a verified list of all affected software versions. The exact crun version and Podman package revision are particularly important when investigating this issue.

How to Reproduce the Problem

A minimal Compose configuration can help determine whether the problem is independent of application-specific settings, storage volumes, networking, and container image customization.

Create a file named docker-compose.yml containing the following configuration in a separate test directory:

services:
  main:
    image: docker.io/library/alpine
    command: sleep 1000

The fully qualified image name avoids potential ambiguity in Podman's short-name image resolution.

Start the container in detached mode:

podman compose up -d

Confirm that the service is running:

podman compose ps

Attempt to execute the hostname command:

podman compose exec main hostname

On an affected system, this operation may fail with the oom_score_adj permission error.

The test container remains active for approximately 1,000 seconds after startup. Complete the diagnostic tests before the sleep command finishes, or restart the test container if necessary.

What Is oom_score_adj in Linux?

Linux includes an Out-of-Memory (OOM) killer that can terminate processes when the system or an applicable memory allocation domain experiences severe memory pressure.

The kernel evaluates eligible processes to determine which process should be terminated to recover memory.

The oom_score_adj attribute allows software to influence this selection process.

For an individual process, the attribute is available through:

/proc/PID/oom_score_adj

A process can refer to its own adjustment value through:

/proc/self/oom_score_adj

Supported adjustment values range from -1000 to +1000.

Adjustment Value General Meaning
-1000 Excludes the process from normal OOM-killer selection.
-500 Reduces the likelihood of OOM-killer selection.
0 Applies no additional score adjustment.
200 Increases the likelihood of selection.
1000 Applies the maximum positive adjustment.

These values influence the kernel's selection algorithm; they are not percentages or memory allocation limits.

Linux restricts certain reductions in OOM score adjustment. In particular, lowering the adjustment below a value previously established by a privileged process can require the CAP_SYS_RESOURCE capability.

A rootless container runtime may therefore encounter a permission error when attempting to apply a value that conflicts with an inherited restriction.

Importantly, an error involving oom_score_adj does not necessarily indicate that the computer has run out of memory. It can occur on a system with sufficient available RAM because the failure concerns permission to modify a process attribute.

What Is crun?

crun is a container runtime that implements the Open Container Initiative (OCI) runtime specification.

Podman uses an OCI runtime to perform low-level container operations, including process creation, namespace configuration, resource configuration, and execution of additional processes inside existing containers.

When a user executes a command such as:

podman exec mycontainer hostname

Podman prepares the execution configuration and delegates the relevant low-level operations to the configured OCI runtime.

If crun cannot apply a required process attribute, it may terminate the execution attempt before the requested application starts.

Consequently, the error does not necessarily mean that the hostname executable itself has incorrect file permissions.

Why Podman Compose Behaves Differently from Direct Podman Commands

Despite its name, podman compose is not a complete, independent implementation of the Compose specification.

According to the official Podman documentation, it delegates Compose operations to an external provider.

Common providers include:

  • docker-compose
  • podman-compose

When both providers are installed, Docker Compose normally takes precedence unless the administrator explicitly configures a different provider.

Direct Podman Execution

Podman CLI
    |
    v
Podman container management
    |
    v
OCI runtime (crun)
    |
    v
Container process

Podman Compose Using Docker Compose

podman compose
    |
    v
Docker Compose provider
    |
    v
Podman Docker-compatible API socket
    |
    v
Podman API service
    |
    v
OCI runtime (crun)
    |
    v
Container process

Although both approaches ultimately use Podman and an OCI runtime, they can operate under different process environments.

The API service may inherit systemd resource settings that are not present when Podman is launched directly from an interactive terminal.

Additionally, container configuration values supplied through the Docker-compatible API can differ from those established through the native Podman CLI.

These differences are important when diagnosing OOM score adjustment errors.

Known Upstream Podman and crun Defect

A particularly relevant correction has been identified in the official Podman repository:

Podman Pull Request #30253 - Clamp exec oom_score_adj when the requested value is too low.

The correction was merged into the Podman v6.2 branch on November 16, 2026.

How the Defect Occurs

The upstream investigation describes a mismatch between the adjustment inherited by a rootless Podman service and the adjustment requested for a container execution process.

For example, consider the following values:

Process or Configuration Example oom_score_adj
Interactive user shell 0
Systemd-managed Podman API service 200
Container configuration created through the compatibility API 0
Requested exec process adjustment 0

These values are illustrative. Actual values depend on the installed packages and service configuration.

If the runtime inherits a protected adjustment of 200 but attempts to apply an adjustment of 0, Linux may reject the reduction.

Podman already accounted for this situation during rootless container startup. However, the upstream defect involved the corresponding handling of additional processes started through exec operations.

Relevant Change in crun

The crun project introduced a change to apply the OOM adjustment supplied for an exec process.

The change is documented in:

crun Commit 499c3eb - Apply the exec process oomScoreAdj.

Earlier runtime behavior could leave this execution attribute unapplied. Once the runtime began applying it, an incompatible adjustment could expose the missing handling in Podman.

What the Podman Correction Does

The upstream correction adjusts an excessively low exec OOM score before handing the process configuration to the runtime.

This addresses the identified mismatch without requiring the container to receive additional privileges.

Important: A correction merged into a development or maintenance branch does not automatically mean that every package carrying the corresponding version number includes it. Distribution packages may also contain backported corrections. Verify the actual package revision and patch history.

Although the upstream defect closely matches the reported NixOS symptoms, the exact cause on an individual computer cannot be confirmed without inspecting its runtime version, process attributes, and diagnostic logs.

Other Possible Causes

The upstream defect should be investigated first when the symptoms match. However, other environmental differences can also contribute to similar errors.

Possible Cause Relevance Diagnostic Method
Podman exec OOM adjustment defect Strong match for the reported symptoms. Check package revisions and upstream pull request #30253.
Inherited systemd OOM adjustment May establish the restriction that exposes the defect. Inspect the service configuration and process attributes.
Docker Compose compatibility API behavior May explain differences between native and Compose-created containers. Compare container configurations and execution methods.
Incompatible Podman and crun package revisions A runtime change may expose a defect in an older Podman build. Inspect runtime versions and package history.
Explicit Compose OOM adjustment configuration May introduce an additional conflicting value. Inspect the resolved Compose configuration.
Unexpected API socket or execution mode May cause commands to target a different container environment. Check environment variables and Podman connections.
Custom service restrictions Possible on systems with customized service policies. Inspect systemd unit definitions and logs.

Prerequisites Before Troubleshooting

  • Access to the affected Linux computer.
  • A working Podman installation.
  • Access to the Compose project directory.
  • Permission to inspect the affected user's Podman service.
  • A disposable container environment for configuration experiments.
  • Administrator access for system package updates, if required.

Perform the initial diagnostic commands as the same user who experiences the problem. Running them with sudo can change the container storage, socket, process permissions, and execution environment, making the results unsuitable for diagnosing a rootless failure.

Solution 1: Test Direct Podman Exec Against the Compose Container

This is one of the most useful initial diagnostic procedures because it compares two execution methods against the same running container.

Start the Compose project:

podman compose up -d

Retrieve the container ID for the main service:

cid=$(podman compose ps -q main)

Display the returned container ID:

printf '%s\n' "$cid"

Ensure that the command returns a single, non-empty container ID before continuing.

Inspect its running state:

podman inspect --format '{{.State.Status}}' "$cid"

The expected state is:

running

Execute the hostname command directly through Podman:

podman exec "$cid" hostname

Compare the result with:

podman compose exec main hostname

How to Interpret the Results

Direct Podman Exec Compose Exec Interpretation
Works Fails Strongly suggests a difference in the API service or Compose execution path.
Fails Fails Investigate shared runtime behavior and the Compose-created container configuration.
Container not found Container exists Investigate whether the commands target different sockets, users, or container stores.
Works Works The issue may be intermittent or dependent on the service environment.

If direct execution works, it can also serve as a temporary workaround without recreating the container.

For an interactive shell, use:

podman exec -it "$cid" /bin/sh

Alpine Linux normally provides /bin/sh, whereas Bash is not necessarily installed in its minimal image.

Solution 2: Identify the Installed Podman and Runtime Versions

Collect the actual software versions before making configuration changes.

podman --version
docker-compose version
podman-compose --version
crun --version
uname -r

On NixOS, also record:

nixos-version

Some commands may be unavailable if the corresponding executable is not exposed through the current shell's PATH.

Obtain detailed Podman information:

podman info --debug

Identify the configured OCI runtime:

podman info --format '{{.Host.OCIRuntime.Name}}'

Display the runtime executable path:

podman info --format '{{.Host.OCIRuntime.Path}}'

Display the runtime version reported by Podman:

podman info --format '{{.Host.OCIRuntime.Version}}'

The runtime information reported by Podman is especially useful on NixOS because the executable selected by Podman may reside in the Nix store and differ from a separately installed crun executable available through PATH.

Solution 3: Confirm Whether Podman Is Running Rootless

Rootless Podman runs container management operations without requiring the host's root account.

Check the current user ID:

id -u

A nonzero value indicates that the current shell is not running as the root user.

Check Podman's reported execution mode:

podman info --format '{{.Host.Security.Rootless}}'

A rootless Podman environment normally returns:

true

Also inspect the configured connections:

podman system connection list

Check whether environment variables are influencing the selected backend:

printenv DOCKER_HOST
printenv DOCKER_CONTEXT
printenv CONTAINER_HOST
printenv CONTAINER_CONNECTION
printenv PODMAN_COMPOSE_PROVIDER

An unset variable may produce no output.

Unexpected connection settings can cause the Compose provider and native Podman commands to operate against different environments.

Do not assume that the successful execution of a Docker command using sudo proves that the equivalent rootless Podman operation should succeed. The two environments may have different privileges and service settings.

Solution 4: Inspect the Podman API Service and Socket

When Docker Compose acts as the Compose provider, it normally communicates with Podman through a Docker-compatible API socket.

For a rootless Podman installation, inspect the user-level systemd units:

systemctl --user status podman.socket
systemctl --user status podman.service

Display their effective unit definitions:

systemctl --user cat podman.socket
systemctl --user cat podman.service

Inspect relevant service properties:

systemctl --user show podman.service \
  -p MainPID \
  -p OOMScoreAdjust \
  -p ExecStart \
  -p FragmentPath \
  -p DropInPaths

Pay particular attention to the OOMScoreAdjust property.

A value of 200 is relevant to the upstream defect, but its presence alone does not establish that the installed software is affected.

The Podman API service can be activated on demand by systemd and may terminate after an idle timeout. An inactive service is therefore not necessarily evidence of a malfunction.

Typical Podman Socket Locations

Execution Mode Typical Socket Path
Rootless Podman $XDG_RUNTIME_DIR/podman/podman.sock
Rootful Podman /run/podman/podman.sock
Conventional Docker Engine installation /var/run/docker.sock

Custom installations can use different socket paths.

Solution 5: Compare the Actual OOM Score Adjustment Values

Reading the relevant process attributes can provide direct evidence of differences between the interactive shell and the Podman service.

Display the current shell's adjustment:

cat "/proc/$$/oom_score_adj"

Trigger a Compose operation to activate the Podman API service:

podman compose ps

Retrieve the service process ID:

pid=$(systemctl --user show podman.service \
  --property=MainPID --value)

printf 'Podman service PID: %s\n' "$pid"

If the process ID is greater than zero and the service is still running, inspect its OOM adjustment:

cat "/proc/$pid/oom_score_adj"

If the service has already exited, trigger another Compose operation and repeat the check promptly.

Inspect the Compose-created container configuration:

podman inspect --format '{{.HostConfig.OomScoreAdj}}' "$cid"

Retrieve the host process ID of the container's main process:

container_pid=$(podman inspect \
  --format '{{.State.Pid}}' "$cid")

printf 'Container process PID: %s\n' "$container_pid"

If the container is running and the process ID is valid, inspect the actual process adjustment:

cat "/proc/$container_pid/oom_score_adj"

The container's stored configuration and its actual running process attributes may differ because the runtime can apply additional adjustments.

Example Diagnostic Result

Interactive shell adjustment:       0
Podman API service adjustment:    200
Container configured adjustment:   0

This combination is consistent with the circumstances described in the upstream Podman defect. It is not conclusive proof of the exact value passed to crun during a failed exec operation.

All commands in this section are intended for inspection. There is no need to write directly to process attributes or modify Linux kernel permission settings.

Solution 6: Switch the Compose Provider to podman-compose

Using podman-compose instead of Docker Compose may avoid the Docker-compatible API execution path responsible for exposing the problem.

This is a useful diagnostic test and potential temporary workaround.

Check Whether podman-compose Is Installed

command -v podman-compose

On a NixOS installation where podman-compose is available as a system package, the returned executable path may resemble:

/run/current-system/sw/bin/podman-compose

The actual path depends on the installation.

Select podman-compose Temporarily

Open a separate disposable Compose project directory and run:

export PODMAN_COMPOSE_PROVIDER="$(command -v podman-compose)"

Confirm the selected provider:

podman compose version

Start the test project:

podman compose up -d

Test command execution:

podman compose exec main hostname

If the command succeeds, the result provides additional evidence that the Docker Compose API path contributes to the failure.

Docker Compose and podman-compose may differ in their support for individual Compose features, container naming, project handling, and networking behavior.

Do not switch providers against an existing production project without reviewing these differences.

Restore the Default Provider

Remove the temporary environment variable:

unset PODMAN_COMPOSE_PROVIDER

Before restoring the provider, clean up any disposable project created during the test using the same provider that created it:

podman compose down

This command stops and removes containers and associated project resources. Use it only in the intended test project directory.

Solution 7: Review the NixOS Configuration

The reported NixOS configuration installs both Docker Compose and podman-compose while enabling both Docker and Podman.

A representative configuration is:

{ pkgs, ... }:

{
  environment.systemPackages = [
    pkgs.podman-compose
    pkgs.docker-compose
  ];

  virtualisation.docker.enable = true;

  virtualisation.podman = {
    enable = true;
    defaultNetwork.settings.dns_enabled = true;
  };

  virtualisation.containers.containersConf.settings = {
    engine.compose_warning_logs = false;
  };
}

There is no direct evidence that enabling both Docker and Podman causes this particular OOM adjustment defect.

However, installing both Compose providers allows Podman's default provider-selection behavior to choose Docker Compose.

Enable Compose Provider Warning Messages

The following setting suppresses the message identifying the external Compose provider:

engine.compose_warning_logs = false;

During troubleshooting, enabling this message can make provider selection easier to identify.

For a temporary diagnostic test, run:

PODMAN_COMPOSE_WARNING_LOGS=true podman compose version

Suppressing the warning does not disable the external provider or change the underlying API behavior.

Configure podman-compose as the Preferred Provider

If testing confirms that podman-compose works correctly and is suitable for the required workloads, it can be selected declaratively through the NixOS containers configuration.

For NixOS releases supporting the reported containersConf settings structure, the configuration can be written as:

{ pkgs, ... }:

{
  environment.systemPackages = [
    pkgs.podman-compose
    pkgs.docker-compose
  ];

  virtualisation.docker.enable = true;

  virtualisation.podman = {
    enable = true;
    defaultNetwork.settings.dns_enabled = true;
  };

  virtualisation.containers.containersConf.settings = {
    engine = {
      compose_providers = [
        "${pkgs.podman-compose}/bin/podman-compose"
      ];

      compose_warning_logs = true;
    };
  };
}

Using the package's Nix store path explicitly identifies the preferred Compose executable.

The compose_providers setting is documented by Podman. The NixOS option structure should be checked against the installed NixOS release before deployment.

Apply the Configuration Safely

Back up the existing NixOS configuration or commit the changes to the configuration's version-control repository.

For a conventional non-flake NixOS configuration, build the proposed system without activating it:

sudo nixos-rebuild build

If the build completes successfully, activate the configuration during an appropriate maintenance window:

sudo nixos-rebuild switch

Flake-based systems should use their existing flake-based rebuild procedure.

After activation, verify the selected provider:

podman compose version

Test the Compose exec operation again.

Rollback

If the configuration introduces unexpected problems, restore the previous configuration and rebuild the system.

NixOS also supports returning to a previous system generation:

sudo nixos-rebuild switch --rollback

A system-generation rollback can affect unrelated packages and services. It does not necessarily restore application data or reverse changes made to persistent container storage.

Solution 8: Collect Podman Debug Logs

Diagnostic logs can help identify whether the failure occurs during the API request, OCI runtime preparation, or process execution.

Inspect the Rootless Podman Service Journal

journalctl --user -u podman.service \
  --since "15 minutes ago" --no-pager

Inspect the socket journal:

journalctl --user -u podman.socket \
  --since "15 minutes ago" --no-pager

To observe service messages while reproducing the problem, open a separate terminal and run:

journalctl --user -u podman.service -f

In the original terminal, reproduce the failure:

podman compose exec main hostname

Look for messages involving:

  • oom_score_adj
  • crun
  • conmon
  • Permission denied
  • OCI runtime
  • Container exec creation and startup.

Press Ctrl+C to stop following the journal.

Enable Debug Logging for Direct Podman Execution

podman --log-level=debug exec "$cid" hostname

Compare this output with the Compose-related service logs.

Debug logging enabled on the local Podman CLI does not automatically enable equivalent logging inside a separate systemd-managed API service.

Temporarily Enable Debug Logging for the API Service

For advanced diagnosis, an administrator can configure a temporary systemd user-service override that increases the API service log level.

First inspect the existing service definition:

systemctl --user cat podman.service

The effective ExecStart command and executable path must be preserved when creating an override, particularly on NixOS.

Use the systemd user-service editor:

systemctl --user edit podman.service

Configure the override to retain the existing service arguments while setting Podman's log level to debug.

Because the original service definition and Nix store executable path vary between installations, a universal replacement ExecStart line should not be copied into the configuration.

After reviewing the override, reload the service configuration and restart the API service during a maintenance window.

systemctl --user daemon-reload
systemctl --user restart podman.service

Reproduce the problem and inspect the journal again.

Warning: Restarting the API service can interrupt active API requests and management operations. Do not perform this step while critical container deployments or administrative tasks are in progress.

After collecting the necessary information, remove only the temporary diagnostic override, reload systemd, and restore the original service configuration.

Solution 9: Update Podman to a Package Containing the Upstream Correction

If diagnostic results match the known exec OOM adjustment defect, updating Podman to a package containing the upstream correction is the preferred long-term solution.

The relevant correction is associated with:

  • Podman pull request #30253.
  • Podman v6.2 branch.
  • Exec process OOM score adjustment handling.
  • Compatibility with the corresponding crun exec behavior.

Before updating, verify that the selected Podman package includes the correction or an equivalent backport.

Updating a Channel-Based NixOS Installation

For systems managed through traditional NixOS channels, inspect the configured channels:

sudo nix-channel --list

When an appropriate updated package is available in the configured channel, refresh the channel metadata:

sudo nix-channel --update

Build the proposed system before activation:

sudo nixos-rebuild build

Review the proposed update and activate it during a maintenance window:

sudo nixos-rebuild switch

Updating a NixOS channel can update numerous system packages rather than Podman alone. Review compatibility requirements before applying the update to a production system.

Updating a Flake-Based NixOS Installation

For a flake-managed installation, update the relevant pinned package input according to the system's existing deployment procedure.

Review the resulting lock-file changes and confirm that the selected package revision contains the required Podman correction.

Avoid replacing the entire package set solely to obtain a single correction without evaluating the impact on other services.

Verify the Updated Runtime

podman --version
podman info --format '{{.Host.OCIRuntime.Version}}'

Confirm that the running Podman API service uses the intended updated executable.

systemctl --user show podman.service -p ExecStart

If necessary, arrange a controlled restart of the API service so that subsequent requests use the updated package.

Repeat the minimal Compose reproduction and confirm whether the exec operation now succeeds.

Solution 10: Evaluate an Alternative OCI Runtime

Podman supports different OCI runtimes, including crun and runc, when they are installed and properly configured.

Testing a disposable workload with another supported runtime can help determine whether the error depends on crun-specific behavior.

However, changing the runtime does not necessarily correct the underlying Podman defect.

Before evaluating an alternative runtime:

  • Confirm that the alternative runtime is installed and supported by the selected Podman package.
  • Review the runtime configuration in the distribution's containers.conf documentation.
  • Use a newly created disposable container.
  • Do not change the runtime associated with an existing production container without a migration plan.
  • Verify application compatibility and resource-management behavior.

For NixOS, prefer declarative runtime configuration through supported NixOS options rather than manually replacing runtime executables in system-managed paths.

An alternative runtime should be considered a diagnostic or temporary compatibility measure unless it is independently appropriate for the production environment.

Check Whether the Compose Configuration Contains oom_score_adj

The Compose specification supports an oom_score_adj service attribute.

A Compose project may contain an explicit adjustment value, or the provider and API backend may establish a default value.

Inspect the resolved Compose configuration:

podman compose config

Review the output for:

  • Explicit oom_score_adj settings.
  • Service overrides.
  • Unexpected resource configuration.
  • Differences introduced by additional Compose files.

The minimal Alpine reproduction does not explicitly configure an OOM adjustment. Therefore, the absence of this attribute in the Compose file does not rule out the upstream defect.

Do not arbitrarily change OOM adjustment values to suppress the error. Such changes can alter how workloads are treated during memory pressure and may conceal the underlying software incompatibility.

Be careful when sharing the output of podman compose config, because resolved configurations can contain environment variables and sensitive application settings.

Understanding Exit Status 126

Podman documents exit status 126 as an indication that the requested container command could not be invoked.

Exit Status Meaning in Podman Exec
0 The executed command completed successfully.
125 Podman encountered an internal or command-processing error.
126 The requested command could not be invoked.
127 The requested executable could not be located.
Other values May represent the exit status returned by the executed application.

In the reported Compose error, the wrapper reports exit status 126 from the external provider.

The accompanying crun error indicates that process preparation failed while handling an OOM adjustment. The exit status alone is not sufficient to identify the underlying cause.

Does Disabling the Pseudo-Terminal Resolve the Problem?

Docker Compose normally allocates a pseudo-terminal for interactive exec operations.

As an additional diagnostic test, disable pseudo-terminal allocation:

podman compose exec -T main hostname

If this command succeeds while the normal exec command fails, investigate terminal allocation and the associated execution path.

If both commands fail with the same OOM adjustment error, the problem is unlikely to be limited to terminal allocation.

The -T option is a diagnostic test, not a documented correction for the upstream OOM adjustment defect.

Why Docker Compose Works with Docker Engine

Docker Compose is a client that communicates with a container-management backend.

When Docker Engine is the backend, the operation uses Docker's daemon and runtime-management implementation.

When Podman is the backend, Docker Compose communicates through Podman's compatibility API.

Characteristic Docker Compose with Docker Engine Docker Compose with Podman
Backend Docker Engine Podman API service
API implementation Docker Engine API Docker-compatible Podman API
Typical runtime management Docker-managed runtime stack Podman-managed OCI runtime
Process environment Depends on Docker daemon configuration Depends on Podman service and execution mode
Rootless support Supported with appropriate configuration Supported
Reported test result Exec succeeds Exec fails with crun permission error

Compatibility with the Docker API does not guarantee identical internal process management or behavior across every software version.

The reported successful Docker test also uses sudo, while the affected Podman commands do not. This introduces another important difference in the comparison.

Consequently, successful execution through Docker Engine does not rule out a rootless Podman-specific runtime defect.

Recommended Troubleshooting Decision Table

Diagnostic Finding Recommended Next Action
Direct exec works against the same Compose-created container. Use direct Podman exec temporarily and inspect the API service environment.
podman-compose works but Docker Compose fails. Investigate the Docker-compatible API path and consider selecting podman-compose.
Podman service adjustment is higher than the configured container adjustment. Compare the environment with the upstream Podman defect.
Installed Podman package lacks the upstream correction. Plan an update to a package containing the correction.
Different commands target different container stores. Correct the connection or execution-mode mismatch before further testing.
Only a particular runtime exhibits the failure. Review Podman and runtime compatibility and relevant upstream changes.
All execution methods fail. Investigate broader runtime configuration and container process errors.
The problem persists after installing the confirmed correction. Collect debug logs and submit a detailed upstream issue report.

Actions That Should Be Avoided

The following actions are not recommended as initial solutions to this problem:

  • Running all containers in privileged mode.
  • Granting unnecessary Linux capabilities to application containers.
  • Disabling container security restrictions without identifying the cause.
  • Changing permissions on files under /proc.
  • Arbitrarily changing system-wide OOM protection policies.
  • Making the Podman API socket accessible to unauthorized users.
  • Exposing the Podman API through an unsecured network endpoint.
  • Switching permanently from rootless to rootful containers solely to suppress the error.
  • Deleting container storage or persistent application volumes.
  • Running podman system reset as an initial troubleshooting step.
  • Downgrading container runtime packages without reviewing security and compatibility implications.

These actions can weaken security, disrupt workloads, or cause data loss without correcting the underlying software defect.

The preferred solution is to correct the software compatibility problem while preserving the existing container security model.

How to Verify That the Problem Has Been Resolved

After applying a confirmed correction or selecting a working Compose provider, use the disposable Alpine project to verify the result.

Start the test service:

podman compose up -d

Confirm that the container is running:

podman compose ps

Execute the original failing command:

podman compose exec main hostname

A successful result should contain the container's hostname without the OCI permission error.

Check the command's exit status immediately afterward:

echo $?

The expected result is:

0

Test another simple command:

podman compose exec main id

Test an interactive shell:

podman compose exec main /bin/sh

Exit the shell when testing is complete:

exit

Finally, review recent service logs:

journalctl --user -u podman.service \
  --since "5 minutes ago" --no-pager

Confirm that no new fatal OOM adjustment errors accompany successful exec operations.

Once verification is complete, remove the disposable Compose project:

podman compose down

Do not execute the cleanup command against a production project unless stopping and removing its containers is intended.

How to Report the Problem to Podman or NixOS Developers

If the problem persists, a detailed issue report can help developers reproduce and investigate the failure.

Collect the following information:

  • NixOS version and package-set revision.
  • Linux kernel version.
  • Podman version and package revision.
  • crun version and actual runtime executable path.
  • Docker Compose version.
  • podman-compose version, if installed.
  • Rootless or rootful execution mode.
  • Selected Compose provider.
  • Minimal Compose configuration.
  • Exact commands used to reproduce the failure.
  • Complete error message and exit status.
  • Results of direct Podman exec against the same container.
  • Relevant systemd service configuration.
  • Podman service OOM adjustment value.
  • Container configuration OOM adjustment value.
  • Relevant Podman debug logs.
  • Whether the installed package contains pull request #30253 or an equivalent correction.

Review diagnostic information before sharing it publicly. Remove passwords, access tokens, private registry credentials, confidential environment variables, internal network details, and other sensitive information.

Relevant upstream issue trackers include:

Search existing reports before creating a new issue. Reference the known upstream correction when the symptoms match.

Historical Reports of Similar Errors

Similar OOM adjustment permission errors have occurred in earlier Podman and crun releases.

For example, a historical report involving Podman 4.6.2, crun 1.9, and Docker Compose 2.20.3 described failures when starting rootless containers through the Docker-compatible API while direct Podman execution continued to work.

The relevant historical reports are:

These reports demonstrate that interactions between the API service, rootless permissions, and runtime versions have previously produced similar messages.

However, historical container-startup failures should not automatically be treated as identical to the newer exec-specific defect. Their historical workarounds may not be appropriate for current software versions.

Frequently Asked Questions

Does the oom_score_adj permission error mean the system has insufficient RAM?

No. The error indicates that a process could not apply an OOM score adjustment. It can occur even when sufficient memory is available.

Is the Alpine Linux container image responsible for the error?

There is no evidence that Alpine Linux is responsible for the reported failure. The error originates from the OCI runtime during process preparation. Other container images may exhibit the same behavior under equivalent conditions.

Why does podman run work while podman compose exec fails?

Native Podman commands and Docker Compose operations can use different execution environments. A systemd-managed API service may inherit resource settings that differ from those of an interactive shell.

Are podman compose and podman-compose the same?

No. podman compose delegates operations to an external Compose provider. The podman-compose executable is one possible provider.

Can Docker Compose be used with Podman?

Yes. Podman provides a Docker-compatible API that allows Docker Compose to manage Podman containers. Compatibility can vary depending on software versions, API features, and workload requirements.

Does installing both Docker and Podman cause this error?

Not necessarily. Both can coexist on NixOS. The relevant considerations are provider selection, API socket selection, execution mode, and software compatibility.

Is this problem specific to NixOS?

Not necessarily. The identified upstream defect involves Podman and crun behavior on Linux. Other distributions containing affected package combinations may encounter similar symptoms.

Will updating Docker Compose alone resolve the issue?

There is no guarantee. The closely matching upstream correction is implemented in Podman. Updating Docker Compose alone may leave the underlying runtime interaction unchanged.

Is Podman 6.2 guaranteed to resolve the error?

No universal guarantee can be made based solely on a version number. The relevant correction was merged into the v6.2 branch, but the installed package must contain that correction or an equivalent backport. Other causes of similar permission errors may also exist.

Do I need to recreate existing containers after updating Podman?

Not necessarily. Test the updated API service against the existing container first. If recreation is required for a particular configuration change, review persistent storage and application availability requirements before proceeding.

Can I continue using direct podman exec commands?

Yes, provided direct execution works against the intended Compose-created container. This can be a practical temporary workaround while retaining the existing Compose deployment.

Should I run the container as privileged to resolve the error?

No. Privileged execution is not an appropriate first-line solution for this defect. The upstream correction is intended to address the incompatible process adjustment without granting unnecessary container privileges.

Key Takeaways

  • The error concerns permission to apply a Linux process OOM score adjustment, not necessarily insufficient system memory.
  • Podman Compose delegates operations to an external Compose provider.
  • Docker Compose can use Podman's systemd-managed compatibility API, which may have different inherited process settings from the native Podman CLI.
  • A closely matching exec-specific defect has been identified in the official Podman repository.
  • Podman pull request #30253 addresses the relevant rootless exec OOM adjustment handling.
  • Testing direct Podman exec against the same Compose-created container is an important diagnostic step.
  • Switching to podman-compose may provide a temporary workaround.
  • Updating to a verified package containing the upstream correction is the preferred long-term solution when the defect is confirmed.
  • Unnecessary privilege escalation and changes to Linux process security restrictions should be avoided.

The exact affected package combination must be established through local diagnostics. The reported environment does not specify the crun version or provide service logs, so the upstream defect remains a strongly supported explanation rather than a confirmed diagnosis of that individual installation.

Official References and Further Reading

Technical Verification and Scope

This troubleshooting guide is based on the reported NixOS environment, official Podman documentation, Linux process-management documentation, and relevant upstream Podman and crun source-code changes reviewed on December 6, 2026.

The upstream correction and its branch merge have been verified. Availability of that correction in a specific NixOS package revision has not been established. The diagnostic commands and proposed configuration changes have not been executed on the affected computer.

The article therefore distinguishes documented software behavior from environment-specific diagnostic conclusions. Administrators should verify package revisions, configuration compatibility, and test results before applying changes to production systems.

YOUR FEEDBACK

Was this guide useful?

Your answer helps us keep BISONKB accurate and practical.

Links are permitted only to published BISONKB articles.