Running chroot from a unprivileged pod fails in OCP 4
Issue
- SFTP pods failing to start because missing permissions.
-
Pod fail to start (
crashLoopBackOff
) due to not enough permission provided to the pod with the following error:mkdir: cannot create directory '/var/run/sftp': Permission denied /entrypoint: Error on line 34: mkdir -p "$(dirname $userConfFinalPath)"
-
Pods fail to start (
crashLoopBackOff
) due to theSCC
(Security Context Constraints) being too restrictive with the following error:chroot("/run/sshd"): Operation not permitted [preauth]
Environment
- Red Hat OpenShift Container Platform (RHOCP)
- 4
- Red Hat OpenShift on AWS (ROSA)
- 4
- Red Hat OpenShift Dedicated (OSD)
- 4
- Red Hat OpenShift on Azure (ARO)
- 4
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.