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 05-15-2003, 04:11 PM   #1
thamarsol
LQ Newbie
 
Registered: May 2003
Posts: 10

Rep: Reputation: 0
bash: ./ms-stop: bad interpreter: Permission denied



Hi, it's the newbie of newbies here!

Does anybody have a clue about what should I do to get read of this error message and execute my tools?

bash: ./ms-analyze: bad interpreter: Permission denied

I already check using ls -l and I do have wrx permissions.

Thanks!
 
Old 05-15-2003, 04:36 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,353
Blog Entries: 55

Rep: Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541
Is the script on a partition that has a "noexec" mount flag?
Just run "mount" to check.
 
Old 05-15-2003, 04:47 PM   #3
thamarsol
LQ Newbie
 
Registered: May 2003
Posts: 10

Original Poster
Rep: Reputation: 0
I run mount and this is the outcome, but I can't tell about the flag, I mean, I don't understand what this command mount is about. Can you figure that out?

thamy@ccc:~/TOOLS/MS/bin> mount
/dev/hda2 on / type reiserfs (rw)
proc on /proc type proc (rw)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
/dev/hda1 on /boot type ext2 (rw)
/dev/hdb1 on /research type ext2 (rw)
/dev/hdb2 on /unilocal type ext2 (rw)
/dev/hda9 on /home type reiserfs (rw,usrquota)
/dev/hda8 on /opt type reiserfs (rw)
/dev/hda5 on /usr type reiserfs (rw)
/dev/hda6 on /var type reiserfs (rw)
/dev/hda7 on /var/spool type reiserfs (rw)
shmfs on /dev/shm type shm (rw)
thamy@ccc:~/TOOLS/MS/bin>
 
Old 05-15-2003, 06:25 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,353
Blog Entries: 55

Rep: Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541
Well, mount shows the filesystems (partitions and virtual ones, like /proc) that are mounted. I was looking for the "noexec" option like in "/dev/hda9 on /home type reiserfs (rw,noexec)", but I see it isn't there.

Weird. Especially since the error reads "bash: ./ms-analyze: bad interpreter: Permission denied". I mean, if it was a non-existant shell, it would say "bad interpreter: No such file or directory". Are you able to execute any scripts in your home directory?
 
Old 05-16-2003, 11:07 AM   #5
thamarsol
LQ Newbie
 
Registered: May 2003
Posts: 10

Original Poster
Rep: Reputation: 0
Yes, yesterday I executed one. I'm about to quit on this, I have no clue and I have no experience with LINUX so I don't know what else to do. Thanks anyway for all the help!

CU
 
Old 05-16-2003, 12:03 PM   #6
vbu
LQ Newbie
 
Registered: Jan 2003
Distribution: Mandrake 10.1
Posts: 3

Rep: Reputation: 0
I've had this happen to me when I edited a script on a windows PC. Problem was caused by how notepad wrote the carriage returns/line feeds in the file.

You can fix it by running

Code:
dos2unix ms-analyze
this utility converts the cr/lf from a dos file to the *nix version. If you don't have this util you can download it from

http://www.megaloman.com/~hany/software/hd2u/

HTH
 
Old 05-17-2003, 10:29 AM   #7
thamarsol
LQ Newbie
 
Registered: May 2003
Posts: 10

Original Poster
Rep: Reputation: 0
Unhappy I tried dos2unix but I still get the message bad interpreter permission denied

So, I'm here again. I already tried what vbu suggested about converting the file from DOS to *nix version but the error message is still there. Weird thing is that I can run other scripts in my account.
Thanks for the help!

Thamar S.

bash: ./ms-analyze: bad interpreter: Permission denied
 
Old 05-17-2003, 12:29 PM   #8
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,353
Blog Entries: 55

Rep: Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541
Could you post some more details like the first few non-empty lines of the script, what package it's part of and what it's purpose is and if it's being run on other boxen w/o problems?
 
Old 05-19-2003, 11:27 AM   #9
thamarsol
LQ Newbie
 
Registered: May 2003
Posts: 10

Original Poster
Rep: Reputation: 0
Well the script is part of a morphosyntactic processor, my admin already tried to execute it as root with no success. I send you here the first lines....


#! /bin/tcsh

setenv LPDIR /home/thamy/TOOLS/MS
setenv LPLIB /home/thamy/TOOLS/LIB
setenv NAMESERVER

$LPDIR/bin/ms-analyze $*
 
Old 05-19-2003, 12:12 PM   #10
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,353
Blog Entries: 55

Rep: Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541
Oh. Cool. Hmm. *Do* you have /bin/tcsh?
 
Old 05-19-2003, 12:15 PM   #11
thamarsol
LQ Newbie
 
Registered: May 2003
Posts: 10

Original Poster
Rep: Reputation: 0
Yes I have
 
Old 05-19-2003, 12:23 PM   #12
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,353
Blog Entries: 55

Rep: Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541
And if you excute the file as "tcsh ./ms-analyze"?
 
Old 05-19-2003, 01:01 PM   #13
thamarsol
LQ Newbie
 
Registered: May 2003
Posts: 10

Original Poster
Rep: Reputation: 0
I already tried that and the error message is still permission denied
 
Old 05-19-2003, 01:17 PM   #14
thamarsol
LQ Newbie
 
Registered: May 2003
Posts: 10

Original Poster
Rep: Reputation: 0
Unhappy Using source gets me a different output....

I read on a different LINUX list that command source may help so I tried source ms-analyze and this is what I see:

bash: BEGIN: command not found
bash: /bin/ms-analyze: line 4: syntax error near unexpected token `and'
bash: /bin/ms-analyze: line 4: ` (!$ENV{LPDIR}) and print STDERR "LPDIR undefined!\n" and exit;'


Any ideas?
 
Old 05-19-2003, 05:15 PM   #15
mhearn
LQ Guru
 
Registered: Nov 2002
Location: Durham, England
Distribution: Fedora Core 4
Posts: 1,565

Rep: Reputation: 47
source won't work, it's not a bash script.

Only scan read this thread, did you make it +x?

chmod +x ./ms-analyze
 
  


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
Bash: bad interpreter, permission denied jpantone Linux - General 22 05-27-2010 06:05 AM
/bin/sh: bad interpreter: Permission denied itsaso Linux - Newbie 6 05-18-2005 10:00 AM
: bad interpreter: Permission denied LinuxRam Linux - Newbie 2 08-22-2004 09:33 PM
/bin/sh: bad interpreter: Permission denied linmix Linux - Software 12 08-16-2004 06:40 AM
perl: bad interpreter: Permission denied bulliver Linux - Software 4 01-27-2003 03:12 PM


All times are GMT -5. The time now is 04:03 PM.

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