I have a script which calls some other bash, python, and ruby scripts. The script is similar to the following:
#!/bin/bash
set -x
./aux1.py
./aux2.sh
When I run the script from the command line, it runs but it gives me the following output:
./script.sh: line 5: ./aux1.py: Permission denied
The aux.py
script has #!/usr/bin/env python
at the top; when I call it from the command line with ./aux.py
it is fine, however when called from this script in the exact same way I get this error. The strange part is that this only happens when I run the script with ./script.sh
; when I run the script with bash script.sh
the auxilliary scripts work perfectly.
I'm using Linux, why does this happen?
Update, 3 March 2014
There's nothing conflicting in the PATH
, and all of the scripts are chmod +rx
. uname -srvmo
gives
Linux 2.6.32-431.3.1.el6.x86_64 #1 SMP Fri Dec 13 06:58:20 EST 2013 x86_64 GNU/Linux
and there's no more information available in uname -a
. SELinux is enabled, but I'm not an administrator so I can't access that information.