LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   bash: ./ms-stop: bad interpreter: Permission denied (https://www.linuxquestions.org/questions/linux-software-2/bash-ms-stop-bad-interpreter-permission-denied-59976/)

thamarsol 05-15-2003 04:11 PM

bash: ./ms-stop: bad interpreter: Permission denied
 
:D
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!

unSpawn 05-15-2003 04:36 PM

Is the script on a partition that has a "noexec" mount flag?
Just run "mount" to check.

thamarsol 05-15-2003 04:47 PM

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>

unSpawn 05-15-2003 06:25 PM

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?

thamarsol 05-16-2003 11:07 AM

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

vbu 05-16-2003 12:03 PM

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

thamarsol 05-17-2003 10:29 AM

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

unSpawn 05-17-2003 12:29 PM

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?

thamarsol 05-19-2003 11:27 AM

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

unSpawn 05-19-2003 12:12 PM

Oh. Cool. Hmm. *Do* you have /bin/tcsh?

thamarsol 05-19-2003 12:15 PM

Yes I have

unSpawn 05-19-2003 12:23 PM

And if you excute the file as "tcsh ./ms-analyze"?

thamarsol 05-19-2003 01:01 PM

I already tried that and the error message is still permission denied

thamarsol 05-19-2003 01:17 PM

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?

mhearn 05-19-2003 05:15 PM

source won't work, it's not a bash script.

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

chmod +x ./ms-analyze


All times are GMT -5. The time now is 06:05 PM.