Here is our test script...
#!/bin/bash
echo "Hello World"
It is on an NFS share that is mounted on a Linux client. If we call the script like this:
./testscript.sh
then we get this:
sh: ./testscript.sh: Permission denied
If we call it like this:
bash ./testscript.sh
then it executes properly. Also, if we run it on the local filesystem, then it executes correctly without the "bash" prepended.
Any way to do this so that the shebang works? By the way, permissions are wide open on this. 777.
Edit 1:
I found the issue.
I had "user" set in the mount options for the NFS mount. Apparently that removes the ability to execute. I changed that and now it seems to be working.