[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

User "admin" cannot get securitycontextconstraints at the cluster scope



Hi

I was working through the O'Reilly book "OpenShift for developers" but the example on page 75, where tomcat8 is run fails:

- The container remains in crashloop backoff
- The logs show the container is having permission issues:

----
Aug 02, 2018 1:03:47 AM org.apache.catalina.startup.Catalina load
WARNING: Unable to load server configuration from [/usr/local/tomcat/conf/server.xml]
Aug 02, 2018 1:03:47 AM org.apache.catalina.startup.Catalina load
WARNING: Permissions incorrect, read permission is not allowed on the file.
Aug 02, 2018 1:03:47 AM org.apache.catalina.startup.Catalina start
SEVERE: Cannot start server. Server instance is not configured.
----

- This appears to be due to openshift/minishift not allowing containers to run as root
- I try installing the anyuid addon and running this command:
- oc adm policy add-scc-to-user anyuid -z default -n tomcat8
- However it fails with this error despite the anyuid addon being applied:

----
Error from server (Forbidden): securitycontextconstraints "anyuid" is forbidden: User "admin" cannot get securitycontextconstraints at the cluster scope: User "admin" cannot get securitycontextconstraints at the cluster scope
----


How do I fix this?

Thanks in advance,
Traiano


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]