[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bash tries to exec scripts with no exec mode bits.
From: |
Alan Donovan |
Subject: |
bash tries to exec scripts with no exec mode bits. |
Date: |
Tue, 3 Dec 2002 15:55:26 -0500 |
Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu'
-DCONF_VENDOR='pc' -DSHELL -DHAVE_CONFIG_H -D_GNU_SOURCE -I. -I. -I./include
-I./lib -O2 -march=i386 -mcpu=i686
uname output: Linux scallion 2.4.18-18.7.x #1 Wed Nov 13 19:30:43 EST 2002 i686
unknown
Machine Type: i686-pc-linux-gnu
Bash Version: 2.05a
Patch Level: 0
Release Status: release
Description:
bash tries to execute scripts that do not have execute mode bits.
Repeat-By:
% ^X^V
GNU bash, version 2.05a.0(1)-release (i686-pc-linux-gnu)
% cat >$HOME/bin/scripts/foo # create a script
#!/bin/sh
echo foo
^D
% ls -l $HOME/bin/scripts/foo
-rw-rw-r-- [...]/bin/scripts/foo # note: no exec mode bits
% export PATH=$HOME/bin/scripts:$PATH # put it on the PATH
% which foo
/usr/bin/which: no foo in (...PATH...) # good: no exec
% type foo
foo is /g1/users/adonovan/bin/scripts/foo # uh-oh!
% foo
bash: /g1/users/adonovan/bin/scripts/foo: \
/bin/sh: bad interpreter: Permission denied # uh-oh!
This behaviour is unexpected and I think different from previous
versions of bash. Note that hash -r makes no difference. Bash
builtin 'type' shouldn't consider 'foo' a command.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bash tries to exec scripts with no exec mode bits.,
Alan Donovan <=