[SOLVED] Error in script "invalid interpreter"

Mike McCarty mike.mccarty at sbcglobal.net
Mon Oct 17 22:40:26 UTC 2005


Andy Green wrote:

Thanks for your kind reply.

> Mike McCarty wrote:
> 
> 
>>Richard E Miles wrote:
>>
>>Thanks very much for your kind reply.
> 
> 
> Can the "permission denied" that seems to be at the heart of it be
> selinux?  Check your var/log/audit/audit.log if FC4 or /var/log/messages
> if earlier.
> 
> Also look at your mount options for the cdrom with mount... noexec?
> 
> -Andy

$ /usr/sbin/sestatus
SELinux status:         disabled

$ grep cdrom /etc/fstab
/dev/cdrom    /mnt/cdrom    udf,iso9660 noauto,user,kudzu,ro 0 0

$ cp -p src/run.sh ~

$ ls -l ~/run.sh
-r-xr-xr-x  1 jmccarty jmccarty 1586 Jul  2  1997 /home/jmccarty/run.sh

$ ~/run.sh
awk: cmd. line:1: (FILENAME=- FNR=1) fatal: attempt to access field -3
awk: cmd. line:1: (FILENAME=- FNR=1) fatal: attempt to access field -2
/home/jmccarty/build/lcc/4.2/x86-linux/rcc -target=/ :
/home/jmccarty/build/lcc/4.2/x86-linux/lcc: -o would overwrite tst/.s.c

So it appears that permissions might indeed be involved.
Maybe I need to add ",exec" to the CDROM mount...

Yep, that was it. I edited /etc/fstab

$ grep cdrom /etc/fstab
/dev/cdrom   /mnt/cdrom   udf,iso9660 noauto,user,kudzu,exec,ro 0 0

unmounted and remounted, and now the script runs.

Just need to figure out why it fails, but it runs.

Mike
-- 
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!




More information about the fedora-list mailing list