Entries from February 2004 ↓

etcon #0

Despite the name, it isn’t a conference for extra terrestrials. ETCon, or ETech, is O’Reilly’s emerging technology conference. It started today with tutorials that we didn’t enroll for, so we just came down to use the network. We did try to register this morning, but we were told that we had to wait until this afternoon because we are all evil terrorists who might sneak into one of the tutorials we didn’t enroll for and infect everyone with a new lethal virus we have developed, or something like that.

Apache2 cgi userdir

A simple reqest: I wanted to run a cgi script from my public_html dir in my home dir. So I set the appropriate permissions and the ExecCGI option in my Apache2 config and tried the script. It failed. The error log reported “Premature end of script headers”, so there was obviously something wrong with the script.

But no! The script worked when I tested it. It just wouldn’t work when Apache2 tried it.

I had no idea what was happening, so I tried some other scripts. A pattern soon emerged: any script in my home dir would fail. After spending so long getting this far, I’m glad that my first guess at the real problem was correct.

It appears that Apache2 won’t execute scripts in userdirs if it suspects that someone other than the user may be able to affect them, so it didn’t like my scripts because my directories had group write permission. A quick

chmod g-w ~/public_html

was enough to make it all work.