Deployment fails due to SELinux permissions issue
Issue
Deployments fails with what it seems to be related to SELinux permissions or configuration:
$ oc logs mongodb-1
ERROR: Couldn't write into /var/lib/mongodb/data
CAUSE: current user doesn't have permissions for writing to /var/lib/mongodb/data directory
DETAILS: current user id = 184, user groups: 997 0
DETAILS: directory permissions: drwxrwxrwx owned by 0:0, SELinux: system_u:object_r:svirt_sandbox_file_t:s0:c7,c8
Environment
OpenShift Container Platform 3.6
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
