summaryrefslogtreecommitdiff
path: root/troubleshooting.md
diff options
context:
space:
mode:
authorflouthoc <flouthoc.git@gmail.com>2021-08-26 16:20:11 +0530
committerAditya Rajan <flouthoc.git@gmail.com>2021-08-30 16:43:14 +0530
commit9b7ef3dad1f8fad2be3f069039673d9860687aea (patch)
tree52a633072c57cb67051e5d94ede2e6f0fbe6359c /troubleshooting.md
parent49cfed756f5dfb6d9267eb29d31f651578c9037c (diff)
downloadpodman-9b7ef3dad1f8fad2be3f069039673d9860687aea.tar.gz
podman-9b7ef3dad1f8fad2be3f069039673d9860687aea.tar.bz2
podman-9b7ef3dad1f8fad2be3f069039673d9860687aea.zip
runtime: Warn if XDG_RUNTIME_DIR is set but is not writable.
[NO TESTS NEEDED] Signed-off-by: Aditya Rajan <flouthoc.git@gmail.com>
Diffstat (limited to 'troubleshooting.md')
-rw-r--r--troubleshooting.md26
1 files changed, 26 insertions, 0 deletions
diff --git a/troubleshooting.md b/troubleshooting.md
index dcf1d8715..e6887f1af 100644
--- a/troubleshooting.md
+++ b/troubleshooting.md
@@ -881,3 +881,29 @@ def signal_listener():
if __name__ == "__main__":
signal_listener()
```
+### 30) Podman run fails with `ERRO[0000] XDG_RUNTIME_DIR directory "/run/user/0" is not owned by the current user` or `Error: error creating tmpdir: mkdir /run/user/1000: permission denied`.
+
+A failure is encountered when performing `podman run` with a warning `XDG_RUNTIME_DIR is pointing to a path which is not writable. Most likely podman will fail.`
+
+#### Symptom
+
+A rootless container is being invoked with cgroup configuration as `cgroupv2` for user with missing or invalid **systemd session**.
+
+Example cases
+```bash
+# su user1 -c 'podman images'
+ERRO[0000] XDG_RUNTIME_DIR directory "/run/user/0" is not owned by the current user
+```
+```bash
+# su - user1 -c 'podman images'
+Error: error creating tmpdir: mkdir /run/user/1000: permission denied
+```
+
+#### Solution
+
+Podman expects a valid login session for the `rootless+cgroupv2` use-case. Podman execution is expected to fail if the login session is not present. In most cases, podman will figure out a solution on its own but if `XDG_RUNTIME_DIR` is pointing to a path that is not writable execution will most fail. Typical scenarious of such cases are seen when users are trying to use Podman with `su - <user> -c '<podman-command>`, or `sudo -l` and badly configured systemd session.
+
+Resolution steps
+
+* Before invoking Podman command create a valid login session for your rootless user using `loginctl enable-linger <username>`
+* If `loginctl` is unavailable you can also try logging in via `ssh` i.e `ssh <username>@localhost`.