Bug 1764269 - broken podman command when run as root
Summary: broken podman command when run as root
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: podman
Version: 29
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Giuseppe Scrivano
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-10-22 15:14 UTC by gabx
Modified: 2019-10-22 17:52 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2019-10-22 17:52:41 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description gabx 2019-10-22 15:14:54 UTC
Description of problem:
Running the podman commands as a regular user gives error.


Version-Release number of selected component (if applicable):
podman version 1.5.1
VERSION="29.20191013.0 (Atomic Host)"
ID=fedora


How reproducible:


Steps to Reproduce:
1.login as a regular user
2.run podman command with some arguments

Example with:
% podman info

Actual results:

Error: could not get runtime: error creating tmpdir /run/user/1001/libpod/tmp: mkdir /run/user/1001: permission denied


Expected results:

host:
  BuildahVersion: 1.10.1
  Conmon:
    package: podman-1.5.1-3.fc29.x86_64
    path: /usr/libexec/podman/conmon
    version: 'conmon version 2.0.0, commit: fa55639b725e7626b28dbd43de8e9546f7411226-dirty'
  Distribution:
    distribution: fedora
    version: "29"
...
---------------------------------------------

Another command with error:

% podman images 
Error: could not get runtime: error creating tmpdir /run/user/1001/libpod/tmp: mkdir /run/user/1001: permission denied

# podman images
REPOSITORY                          TAG      IMAGE ID       CREATED        SIZE
docker.io/linuxserver/mariadb       latest   ab6a31f8a171   2 days ago     348 MB
docker.io/library/redis             latest   01a52b3b5cd1   12 days ago    102 MB
...

-----------------------------------------
Additional info:

1- root does not have XDG_RUNTIME_DIR set in its environment, and /run/user/0 does not exist.
2- SELinux is enforced

Comment 1 Giuseppe Scrivano 2019-10-22 15:48:54 UTC
how did you login?

Can you show the result of ls -l /run/user/1001?

Is /run/user/1001 written in your ~/.config/containers/storage.conf file?

Comment 2 gabx 2019-10-22 17:52:41 UTC
I just founded the culprit after investigation of $HOME configuration file.
I copied my XDG_CONFIG_HOME from one user to another one. I was not aware of the  .config/containers/libpod.conf file. I found in it a wrong path for tmp_dir, with a wrong user ID.

So it is not a bug but a bad configuration. 

Closing.


Note You need to log in before you can comment on or make changes to this bug.