This is an odd one, it only happens on one server (shared hosting, so I have limited access to configuration and logs), but I can't wrap my head around it.
I have a shell script which runs some app's deployment. The file has a +x flag, but I can't run it by simply calling its name from shell, I get an "access denied" error. Invoking bash with the filename as an arguments works like a charm. It looks something like that:
[someuser@someserver:~] $cat test.sh echo "hooray!" [someuser@someserver:~] $chmod +x test.sh [someuser@someserver:~] $ls -l test.sh -rwxrwxr-x 1 someuser someuser 14 Oct 8 11:27 test.sh [someuser@someserver:~] $./test.sh -bash: ./test.sh: Permission denied [someuser@someserver:~] $bash test.sh hooray!
#!/bin/bash at the beginning doesn't help. I also tried from other shell (default is bash, tried in sh), same thing happened.
This is not that big of a problem, but it's baffling for me. What could be the cause?