Jump to content

bad interpreter: Permission denied (as normal user)


paCkeTroUTer
 Share

Recommended Posts

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 :?

Link to comment
Share on other sites

  • Replies 34
  • Created
  • Last Reply

Top Posters In This Topic

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!

Link to comment
Share on other sites

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]$

Link to comment
Share on other sites

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 ....

:?

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

try

ls -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 of

ls -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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share


×
×
  • Create New...