paCkeTroUTer Posted October 12, 2003 Report Share Posted October 12, 2003 I don't know what triggered this behaviour.... I can't execute a script as normal user. For example I was trying to install flash for linux(from macromedia) and here are the commands I gave: [jeffery@localhost install_flash_player_6_linux]$ ls -l total 1504 -rwxrwxr-x 1 jeffery jeffery 23579 Feb 25 2003 flashplayer-installer* -rw-rw-r-- 1 jeffery jeffery 856 Feb 25 2003 flashplayer.xpt -rwxrwxr-x 1 jeffery jeffery 1470464 Feb 25 2003 libflashplayer.so* -rw-rw-r-- 1 jeffery jeffery 20728 Mar 1 2003 readme.htm -rw-rw-r-- 1 jeffery jeffery 11301 Mar 1 2003 readme.txt [jeffery@localhost install_flash_player_6_linux]$ ./flashplayer-installer bash: ./flashplayer-installer: /bin/sh: bad interpreter: Permission denied [jeffery@localhost install_flash_player_6_linux]$ I have been getting this bad interpreter: Permission denied error for the last few days even when I was trying to just run MozillaFirebird from my home directory. Eventually I had to give up and had to install it via rpm. As you can see I have execute permission on the above script I am trying to execute...but it errors on me. Anyone have similar experience with this error can help me out :? Quote Link to comment Share on other sites More sharing options...
Steve Scrimpshire Posted October 12, 2003 Report Share Posted October 12, 2003 What is the output of ls -l /bin/bash Quote Link to comment Share on other sites More sharing options...
paCkeTroUTer Posted October 13, 2003 Author Report Share Posted October 13, 2003 here is the output: [jeffery@localhost install_flash_player_6_linux]$ ls -l /bin/bash -rwxr-xr-x 1 root root 625516 Jan 15 2003 /bin/bash* [jeffery@localhost install_flash_player_6_linux]$ Quote Link to comment Share on other sites More sharing options...
ramfree17 Posted October 13, 2003 Report Share Posted October 13, 2003 how about: what is the output of $ which sh ? maybe sh is not symlinked to bash. just a thought. ciao! Quote Link to comment Share on other sites More sharing options...
paCkeTroUTer Posted October 13, 2003 Author Report Share Posted October 13, 2003 how about: what is the output of $ which sh ? maybe sh is not symlinked to bash. just a thought. ciao! Here is the result: [jeffery@localhost install_flash_player_6_linux]$ which sh /bin/sh [jeffery@localhost install_flash_player_6_linux]$ Quote Link to comment Share on other sites More sharing options...
Qchem Posted October 13, 2003 Report Share Posted October 13, 2003 Have you tried this as root? Check the permissions for using sh. Quote Link to comment Share on other sites More sharing options...
paCkeTroUTer Posted October 13, 2003 Author Report Share Posted October 13, 2003 Have you tried this as root? Check the permissions for using sh. As I said in my first post, the problem is with normal users only and not root. Did you say to check the permissions for using sh for root ? If, how do I check it ? ...sorry I am bit n00bie in this area :? Quote Link to comment Share on other sites More sharing options...
Qchem Posted October 13, 2003 Report Share Posted October 13, 2003 Sorry, I was skim-reading try ls -l /bin/sh, and post the output. Quote Link to comment Share on other sites More sharing options...
ramfree17 Posted October 13, 2003 Report Share Posted October 13, 2003 ah, sorry if i wasnt paying much attention. the flashplayer you are installing might be needing administrative priveleges in order to install some files. try pasting this snippet on a file #!/bin/sh echo "If you see this then you can execute bourne shell scripts." save it (i.e. sample.sh), give it execute permissions (chmod +x sample.sh), and then execute it ( ./sample.sh). if you get an error then you might have a real problem. ciao! Quote Link to comment Share on other sites More sharing options...
paCkeTroUTer Posted October 13, 2003 Author Report Share Posted October 13, 2003 here is the result of that test: [jeffery@localhost install_flash_player_6_linux]$ ls -l total 1508 -rwxrwxr-x 1 jeffery jeffery 23579 Feb 25 2003 flashplayer-installer* -rw-rw-r-- 1 jeffery jeffery 856 Feb 25 2003 flashplayer.xpt -rwxrwxr-x 1 jeffery jeffery 1470464 Feb 25 2003 libflashplayer.so* -rw-rw-r-- 1 jeffery jeffery 20728 Mar 1 2003 readme.htm -rw-rw-r-- 1 jeffery jeffery 11301 Mar 1 2003 readme.txt -rwxrw-r-- 1 jeffery jeffery 76 Oct 14 00:10 sample.sh* [jeffery@localhost install_flash_player_6_linux]$ ./sample.sh bash: ./sample.sh: /bin/sh: bad interpreter: Permission denied [jeffery@localhost install_flash_player_6_linux]$ Quote Link to comment Share on other sites More sharing options...
Qchem Posted October 13, 2003 Report Share Posted October 13, 2003 Can you do an ls -l on /bin/sh ??? I'm getting the feeling that it can only be ran as root. Quote Link to comment Share on other sites More sharing options...
paCkeTroUTer Posted October 13, 2003 Author Report Share Posted October 13, 2003 Can you do an ls -l on /bin/sh ??? I'm getting the feeling that it can only be ran as root. here you go: [jeffery@localhost install_flash_player_6_linux]$ ls -l /bin/sh lrwxrwxrwx 1 root root 4 Oct 1 03:54 /bin/sh -> bash* [jeffery@localhost install_flash_player_6_linux]$ something is screwed up somewhere... why can't I run the sample script ramfree17 has given me to run .... :? Quote Link to comment Share on other sites More sharing options...
Gowator Posted October 13, 2003 Report Share Posted October 13, 2003 try ls -l /bin/bash this is the file its linked to so it will inherit the permissions of that file. Also try modding the first line of ramfree's script to #!/bin/bash echo "If you see this then you can execute bash shell scripts." Call it sample2.bash or something! Do the same as you did with the sample.sh Just to make sure can you post the result of ls -l sampl* (in the directory you created them) Quote Link to comment Share on other sites More sharing options...
paCkeTroUTer Posted October 13, 2003 Author Report Share Posted October 13, 2003 tryls -l /bin/bash this is the file its linked to so it will inherit the permissions of that file. [jeffery@localhost install_flash_player_6_linux]$ ls -l /bin/bash -rwxr-xr-x 1 root root 625516 Jan 15 2003 /bin/bash* [jeffery@localhost install_flash_player_6_linux]$ Also try modding the first line of ramfree's script to#!/bin/bash echo "If you see this then you can execute bash shell scripts." Call it sample2.bash or something! Do the same as you did with the sample.sh #!/bin/bash echo "If you see this then you can execute bourne shell scripts." results: [jeffery@localhost install_flash_player_6_linux]$ ./sample2.sh bash: ./sample2.sh: /bin/bash: bad interpreter: Permission denied [jeffery@localhost install_flash_player_6_linux]$ Just to make sure can you post the result ofls -l sampl* (in the directory you created them) [jeffery@localhost install_flash_player_6_linux]$ ls -l sample2.sh -rwxrw-r-- 1 jeffery jeffery 78 Oct 14 01:24 sample2.sh* [jeffery@localhost install_flash_player_6_linux]$ ls -l sample.sh -rwxrw-r-- 1 jeffery jeffery 78 Oct 14 01:19 sample.sh* [jeffery@localhost install_flash_player_6_linux]$ Thanks for the response everyone..... I will certainly learn from this shelling and bashing around. Hope I have answered all your requests properly. Quote Link to comment Share on other sites More sharing options...
Gowator Posted October 13, 2003 Report Share Posted October 13, 2003 Excellent answers! :D Hmmmm It won't let you execute bash command either. So its not the install script. see what /bin/bash tells you. It should just open another instance of the command interpreter! If this works then it might be some envvar (environment variable) set in your .bashrc file A quick check is su - jeffery So long as your default shell is bash then this should reread the .bashrc etc. Watch for errors here becuase the graphical login can hide them! Your doin great, its likely to be something trivial but annoying! Don't worry, with all the guys and gals here you'll fix it AND learn something :D Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.