Installing on OpenShift - sudo permission denied

I SSH into my gear and follow the instructions here but the first sudo command I enter returns:

bash: /usr/bin/sudo: Permission denied


I am currently working on a guide to help with anyone that is new to any PaaS or Cloud environment - this will hopefully eliminate some of the initial hurdles for anyone familiarizing themselves with any such platform.

A common use case is that many users that are just starting with the DSP are also new to the Cloud or any PaaS, too (AWS, OpenShift, Azure, and Bitnami’s Cloud, especially). Just be prepared to know that there is going to be a small learning curve to understand these systems.

Understanding the foundations of any system can be a challenge. Trust me, I know :wink: In my case at least, by going through “Getting Started” or any such resource, it gives me an advantage.

What is the advantage? Not only have I gained knowledge, but I’ve improved my ability of finding the resources to gain such knowledge. Also, I’ve been told it’s almost like a “Building Block” approach… i.e. I’ve got to understand the basic concepts before I am able to proceed to the next level or “block.”

Again, this is from my experience. One of the best benefits of it is that the knowledge gained whether on OpenShift, Azure, AWS, or the Bitnami Cloud, is all (mostly) transferable. So, the more I work with AWS, the more I understand Cloud architecture and principles, the more likely I am to be a “step ahead” (or two) when deploying another app on a different environment.

Hopefully you’ve made it this far :smile: - let’s see if I can point you in the right direction.

Once you have ssh using a proper token, you should be able to perform sudo commands… That doesn’t sound like the case though. Please, look through the following guides. These will help resolve your specific issue (especially the first one).

Take a quick glance at Resolving Permission Errors on OpenShift and also OpenShift’s Getting Started Guide

I have replicated a similar issue (ability to use sudo) and had success. I am coming into OpenShift via my Ubuntu OS

Which OS are you using to ssh in? I assume that you’ve created your token (.pem most likely), so you should be logged into the system as root. Could you look and tell me what the permissions on the “/usr/bin/sudo” folder?

Keep me in the loop! - and let me know if you know of a good book publisher :wink: ha. Sorry for the length!


  • Mark

I reached out to support at Openshift… and it looks as if you’re not able to run sudo commands and can’t do “yum install.” I’ll have to investigate a bit more into this, but it looks like one option is to install on a PHP gear.

I had originally created a PHP gear thinking that was required and it made no difference. sudo being disallowed is pretty much a show stopper.

My question is, though, how did these people do it? Case Study: A Mobile App for Ski Patrollers


It is possible to install using OpenShift in a few way.

  1. Dreamfactory landing page
  • This shows a list of platforms which the DSP can be installed.
  1. Pull from dsp-core and integrate into your project.
  • You should check this page out just to ensure you know how to add it manually.

There are plenty of instructions amongst all of these links which can show you the steps of installation. Note that we are about to release an upgrade, so you may want to wait a day or two then proceed with the upgrade.


  • Mark