Android shell script permissions? I have a rooted phone, and I was playing around with Terminal Emulator. I tried writing a simple shell script (test.sh) :

#!/bin/sh
echo "Hello, World!" 


Then I opened terminal emulator, cd'd to the directory my script was in, and typed:

./test.sh


and I got a  "permission denied"  error. So I tried:

su
./test.sh


Somehow, still permission denied. So I tried (still as root) :

chmod 775 test.sh
busybox chmod 775 test.sh
busybox chmod +X test.sh


None of the 3 gave errors, but ./test.sh still gave permission denied!  As a last resort I tried

sh test.sh


That ended up working. Finally. 

I'm curious why permission was denied for my own shell script chmodded to 775 when run as root. How can permission be denied for anything as root? How can I fix this and make ./test.sh work?
Execute permissions on the SDCard is blocked for that reason.
See this:
/dev/block/vold/179:1 /mnt/sdcard vfat rw,dirsync,nosuid,nodev,**noexec**,relatime,uid=1000,gid=1015,fmask=0602,dmask=0602,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0

The noexec part of this line emphasized with two asterisks is the key to prevent any execution of scripts/binaries from the SDCard.
Have a funny feeling this was answered before...deja-vu
Edit
Yup @Izzy has answered this before and here as well.