Question: I am trying to install some packes on my machine running CentOS 5.5 but when i run ./config or ./Configure, I am returned:

> 
> -bash: ./config: /bin/sh: bad interpreter: Permission denied
> 
> 
> -bash: ./Configure: Permission denied
> 
> 
> 

What do I need to change to correct the issue? I am connected as the root user

Answer: 
It looks like you got it right the first time with `./config`

The problem seems to lie in `/bin/sh`; you may try using `bash ./config` instead, or otherwise fix `/bin/sh`'s permissions or ownership.

Out of curiosity, can you do: `ls -l /bin/sh`\* for us?

Is the partition or drive where you are trying to build this mounted noexec, like /tmp or similar?

The output of `mount` should show us whether that's the case :)

\*edited
If you haven't gotten it resolved already... Are you trying to install as root? You should be. Otherwise, you might 'sudo'. 

Others have suggested that the permissions problem is on the /bin/sh executable, but if that isn't it, make sure you can execute config / Configure (as appropriate). To do this, look at the file's permissions and consider who you are (whoami). If you aren't root or the file owner, you may be having problems because of that.

.