5

I am using the che.openshift.io - Eclipse Che from Red Hat. I have a workspace of PHP Laravel Stack. When I try to run commands as SUDO from the php terminal I am getting error.

SUDO - not a command /
SU - must be run from a terminal

Can someone help me to run as root user? I have to install the heroku CLI from the terminal which can be done only via root user.

Ilya Buziuk
  • 1,839
  • 5
  • 27
  • 43
Karthika
  • 51
  • 3

1 Answers1

4

In general, containers running as root is a significant security risk + containers are supposed to be immutable and installing anything inside the container is not recommended since after the restart all the packages will vanish.

Eclipse Che workspaces on che.openshift.io are running against Red Hat OpenShift Online clusters which do not support sudo and workspace containers are running using the Arbitrary User IDs (This provides additional security against processes escaping the container due to a container engine vulnerability and thereby achieving escalated permissions on the host node). So, Basically you can not execute sudo from the workspace terminal.

I have to install the heroku CLI from the terminal which can be done only via root user.

In order to support the Heroku CLI from the terminal you have 2 options:

Hope this helps.

Ilya Buziuk
  • 1,839
  • 5
  • 27
  • 43