Re: problems running bash scripts...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Sa, den 20.12.2003 schrieb Gustavo Rahal um 22:24:
> Tom Mitchell wrote:
> 
> >On Sat, 20 Dec 2003, Gustavo Rahal wrote:
> >
> >  
> >
> >>From: Gustavo Rahal <listas@xxxxxxxxxx>
> >>To: fedora-list@xxxxxxxxxx
> >>Subject: problems running bash scripts...
> >>Date: Sat, 20 Dec 2003 18:39:52 +0000
> >>Reply-To: fedora-list@xxxxxxxxxx
> >>
> >>Hi
> >>
> >>When trying to run any bash script I get the following message: "bash: 
> >>./xxxx: /bin/bash: bad interpreter: Permission denied".. Even as root I 
> >>get the same message... any idea?
> >>    
> >>
> >
> >Someone has messed with the permissions of your bash binary
> >or you are not involing the bash you expect.
> >
> >Check .....
> > $ which bash
> > /bin/bash
> > $ ls -l `which bash`
> > -rwxr-xr-x    1 root     root       626028 Apr  9  2003 /bin/bash
> >
> > $ cat /tmp/b1.sh
> > #! /bin/bash
> > echo Hello
> >
> > $ /tmp/b1.sh
> > bash: /tmp/b1.sh: Permission denied
> > $ chmod +x /tmp/b1.sh
> > $ /tmp/b1.sh
> > Hello
> >
> > $ cp `which bash` /tmp/bshell
> >
> > $ cat /tmp/b2.sh
> > #! /tmp/bshell
> > echo Hello
> >
> > $ /tmp/b2.sh
> > Hello
> >
> > $ chmod -x /tmp/bshell
> > $ /tmp/b2.sh
> > /bin/bash: /tmp/b1.sh: /tmp/bshell: bad interpreter: Permission denied
> >
> >My guess is that the path to the interpreter in the first line  depends on PATH
> >with a dot in it or something. i.e.:
> >	#! /bin/bash
> > .vs. 
> >	#! bash
> >and `which bash` for you finds some text file perhaps bashing a political person.
> >This by the way is the same reason why you should never write a program called 'test'.
> >
> >Good luck,
> >TomM
> >  
> >
> 
> Thanks for the reply Mitchell. After trying some more things I found out 
> that the problems is that if I run scripts that are on /mnt/dados/ which 
> is a mounted fat32 partition this problem occurs. On the root partition 
> everything goes fine. But why doesn't it work on fat32 (or maybe with 
> any mounted partitions)?
> 
> Thanks
> Gustavo

Probably mounted with noexec option.

Alexander


-- 
Alexander Dalloz | Enger, Germany
PGP key valid: made 13.07.1999
PGP fingerprint: 2307 88FD 2D41 038E 7416  14CD E197 6E88 ED69 5653

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux