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! |
Is the script on a partition that has a "noexec" mount flag?
Just run "mount" to check. |
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> |
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? |
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 |
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 http://www.megaloman.com/~hany/software/hd2u/ HTH |
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 |
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?
|
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 $* |
Oh. Cool. Hmm. *Do* you have /bin/tcsh?
|
Yes I have
|
And if you excute the file as "tcsh ./ms-analyze"?
|
I already tried that and the error message is still permission denied
|
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? |
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. |