LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-23-2004, 04:31 PM   #1
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993
Blog Entries: 1

Rep: Reputation: 46
/bin/sh: bad interpreter: Permission denied


I'm trying to install the java plug-in for mozilla and ran into the following error:

Code:
[root@localhost linmix]# /mnt/cdrom/extras/java/aurox-java-install.sh
bash: /mnt/cdrom/extras/java/aurox-java-install.sh: /bin/sh: bad 
interpreter: Permission denied
First I thought sh might not exist so I did:

Code:
[root@localhost linmix]# ls -l /bin | grep sh
-rwxr-xr-x  1 root root  98268 Aug  6  2003 ash
-rwxr-xr-x  1 root root 497896 Aug  6  2003 ash.static
-rwxr-xr-x  1 root root 605504 Dec  9  2003 bash
lrwxrwxrwx  1 root root      4 Jul 11 19:09 bash2 -> bash
lrwxrwxrwx  1 root root      3 Jul 11 19:10 bsh -> ash
lrwxrwxrwx  1 root root      4 Jul 11 19:13 csh -> tcsh
lrwxrwxrwx  1 root root      4 Jul 11 19:09 sh -> bash
-rwxr-xr-x  1 root root 319400 Jun  6  2003 tcsh
Bash is definitly working as it is my default shell, so why do I get this error?
 
Old 07-23-2004, 04:37 PM   #2
zakaluka
Member
 
Registered: Oct 2003
Posts: 58

Rep: Reputation: 15
Post the top of the install script. Maybe it is using some options that Bash doesn't like...

Regards,

zakaluka.
 
Old 07-23-2004, 04:41 PM   #3
mritch
Member
 
Registered: Nov 2003
Location: austria
Distribution: debian
Posts: 667

Rep: Reputation: 30
or try "chmod a+x your_script".

sl mritch.
 
Old 07-23-2004, 04:42 PM   #4
hallamigo
Member
 
Registered: Feb 2004
Location: Utah, USA
Distribution: Debian
Posts: 230

Rep: Reputation: 31
The only time I've ever gotten the 'bad interpreter' error with bash is when I moved an ascii file from windows to Linux and tried to execute it - I've been told it happens because the \n and \r are done differently on Windows.

I've had to create a new file or edit the existing one to get rid of the bad newline characters.
 
Old 07-23-2004, 04:44 PM   #5
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993

Original Poster
Blog Entries: 1

Rep: Reputation: 46
Quote:
Originally posted by zakaluka
Post the top of the install script. Maybe it is using some options that Bash doesn't like...
What do you mean? How do I do that?
 
Old 07-23-2004, 04:45 PM   #6
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993

Original Poster
Blog Entries: 1

Rep: Reputation: 46
Quote:
Originally posted by mritch
or try "chmod a+x your_script".
Sounds good! I'll have to copy it to my HD then (can't change it on a cdrom )
 
Old 07-23-2004, 04:46 PM   #7
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993

Original Poster
Blog Entries: 1

Rep: Reputation: 46
Quote:
Originally posted by hallamigo
The only time I've ever gotten the 'bad interpreter' error with bash is when I moved an ascii file from windows to Linux and tried to execute it - I've been told it happens because the \n and \r are done differently on Windows.

I've had to create a new file or edit the existing one to get rid of the bad newline characters.
I doubt this applies as I was trying to install from a distro cd
 
Old 07-24-2004, 02:50 AM   #8
toloban
Member
 
Registered: Sep 2003
Location: D.F.
Distribution: Fedora Core
Posts: 35

Rep: Reputation: 16
I just got that same error message minutes ago, I just typed:

Code:
$sh  /mnt/...../j2re-1_4_2_05-linux-i586-rpm.bin
 
Old 07-24-2004, 03:50 AM   #9
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993

Original Poster
Blog Entries: 1

Rep: Reputation: 46
I decided to copy the file and the other files in the same directory to my /home/linmix directory and try again from there (I checked file permissions and the were x for all)

I su'd to root and ran the script and the miracle happened. The only reason I can think of why the script wouldn't install is because it needed to unzip another file. My guess is that it would do a temporary unzip in the directory it was working from and since it couldn't write to the cdrom produced an error. Can anyone confirm this?
 
Old 07-30-2004, 07:08 AM   #10
knoppix-3.4
LQ Newbie
 
Registered: Jul 2004
Posts: 2

Rep: Reputation: 0
Hi,

I had the same problem,
my shell made me permission denied, I have my home directory linked to an other disk and had the same problem for "punkbuster" (an anti-cheating program) I put my punkbuster on my root (/), my problem desapered.
i put the .sh on my root disk and it ran perfectly.

FOR ME, I edited my /etc/fstab with the options exec :

/dev/hda3 /home ext3 defaults,users,exec 0 0

Sorry, for my english and explanation to not be clear, whish you understand.

YOUR WERE RIGHT. It's because your program .sh .bin ... cannot write to the place it normally have to write.

Ben.
|
| linux; beginner of 8 mounth, still on this lovely OS ;-)
|

Last edited by knoppix-3.4; 07-30-2004 at 07:49 AM.
 
Old 08-01-2004, 05:46 PM   #11
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993

Original Poster
Blog Entries: 1

Rep: Reputation: 46
Thamks for the confirmation and possible sollution (which of course will not work on a cdrom) Don't worry about your English.It's fine for now.
 
Old 08-07-2004, 12:15 AM   #12
mortein
LQ Newbie
 
Registered: Aug 2004
Posts: 1

Rep: Reputation: 0
Yep, I had the same problem.

After reading your post, I changed

/dev/hda3 /home ext3 users 0 0

TO:

/dev/hda3 /home ext3 defaults,users,exec 0 0

and no more problems for the moment.
 
Old 08-16-2004, 07:40 AM   #13
bennyman
LQ Newbie
 
Registered: Aug 2004
Distribution: debian
Posts: 1

Rep: Reputation: 0
cdroms are usualy mounted with the "user" or "users" argument by default which implys the "noexec" option which prevents execution of scripts and binarys. Add exec to the line in fstab or remove the user option and I think you'll be fine!

regards
/bennyman
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/usr/bin/env: bad interpreter: Permission denied Master Fox Linux - Software 8 02-09-2012 09:25 AM
/bin/sh: bad interpreter: Permission denied itsaso Linux - Newbie 6 05-18-2005 11:00 AM
Selinux, ./INSTALL: /bin/sh: bad interpreter: Permission denied TomF Linux - Security 2 12-08-2004 12:36 PM
: bad interpreter: Permission denied LinuxRam Linux - Newbie 2 08-22-2004 10:33 PM
perl: bad interpreter: Permission denied bulliver Linux - Software 4 01-27-2003 04:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration