aboutsummaryrefslogtreecommitdiff
path: root/troubleshooting.md
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-04-28 10:14:31 -0400
committerGitHub <noreply@github.com>2021-04-28 10:14:31 -0400
commit633cc473b5886344cb8313f83f22a4bec3e8fa91 (patch)
treec72345a057ecfa7380d2fe7b3850ba0d31b9ad7a /troubleshooting.md
parent4ca34fce08ffa9e29d0719e3e29383e9ffdb1572 (diff)
parent166149b12dfb855393b434a02c2ecf034b97f8ad (diff)
downloadpodman-633cc473b5886344cb8313f83f22a4bec3e8fa91.tar.gz
podman-633cc473b5886344cb8313f83f22a4bec3e8fa91.tar.bz2
podman-633cc473b5886344cb8313f83f22a4bec3e8fa91.zip
Merge pull request #10139 from rhatdan/troubleshoot
[CI:DOCS] Add troubleshooting advice about the --userns option.
Diffstat (limited to 'troubleshooting.md')
-rw-r--r--troubleshooting.md10
1 files changed, 9 insertions, 1 deletions
diff --git a/troubleshooting.md b/troubleshooting.md
index c5c592a8e..1e21edab4 100644
--- a/troubleshooting.md
+++ b/troubleshooting.md
@@ -23,7 +23,7 @@ touch: cannot touch '/content/file': Permission denied
#### Solution
-This is usually caused by SELinux.
+This is sometimes caused by SELinux, and sometimes by user namespaces.
Labeling systems like SELinux require that proper labels are placed on volume
content mounted into a container. Without a label, the security system might
@@ -47,6 +47,14 @@ will disable SELinux separation for the container.
$ podman run --security-opt label=disable -v ~:/home/user fedora touch /home/user/file
+In cases where the container image runs as a specific, non-root user, though, the
+solution is to fix the user namespace. This would include container images such as
+the Jupyter Notebook image (which runs as "jovyan") and the Postgres image (which runs
+as "postgres"). In either case, use the `--userns` switch to map user namespaces,
+most of the time by using keep_id option.
+
+$ podman run -v "$PWD":/home/jovyan/work --userns=keep_id jupyter/scipy-notebook
+
---
### 3) No such image or Bare keys cannot contain ':'