It wasn’t a permissions issue. I’ve set the permissions to 775. The error in the log is:
Premature end of script headers: test.cgi.
The wiki you linked to says this errors is caused because the header “aren’t being printed correctly. here is a basic working script:”. However, the basic working script is in perl, and I want to remain in bash for this.
Also, I’m editing this in vi… not ftp’ing so CR/LF shouldn’t be an issue. Any other ideas?