/bin/sh links to /bin/bash CentOS4

DamnSkippy

Verified User
Joined
Mar 16, 2005
Messages
273
Location
USA, Texas
I am trying to compile rrdtools and it errors out saying bash: ./configure: /bin/sh: bad interpreter: Permission denied

/bin/sh is listed in /etc/shells but in checking /bin/sh is a link to /bin/bash and this seems to be messing with the build script.

If I try to cd /bin/sh I get /bin/sh: Not a directory

This is my first Linux box (CentOS 4.3) in a long time, is this normal?
 
Make sure that /bin/bash can be executed by the user running the script. Make sure you are installing the program under the "root" user.

/bin/bash should have permissions 755 on it.

If it is not you can change with the command:

chmod 755 /bin/bash
 
Yeah I am logged in as root, actually I logged in as my SSH user (I only allow 1 user SSH access to the server) and did su to root. But that should not matter in this case should it?

/bin/bash is/was 755
 
Well never saw you on the chat site... Since it gave you permission denied I was guessing that the permissions of bash were wrong.

What version of rrdtools are you using? I would like to try to duplicate this error.

Sometimes what I do when I get "bad interpreter" errors is I open up the file place any letter in the beginning then delete the letter and resave the file. This may help to get it to work again.
 
Thanks for the offer to help chatwizrd, I just got back to this thread so I was not ignoring you.

It was version 1.2.13 of rrdtools and I was following these instructions http://oss.oetiker.ch/rrdtool/doc/rrdbuild.en.html

Seemed simple enough as I am used to compiling stuff from source in BSD. But did not get very far as it will not configure. It is strange that I can not even cd /bin/sh as it seems it should send me to /bin/bash. The link seems correct and all, maybe I will recreate it. So I take it this is a normal thing as far as the links because I found a couple others.

Is bash that close to sh that any script written for sh can be run in bash?
 
You can't cd to /bin/sh because sh isn't a directory, and you can't cd to a file.

Jeff
 
Back
Top