CGIWrap

All web scripts at SCCC run through something called CGIWrap. In most cases, you wouldn't need to know about cgiwrap, but there are a few subtle differences that you may want to know about.

Under normal circumstances, CGI and other web scripts run as the same user as the web server. With CGIWrap they run as the user who owns the script file. This means your scripts can read and write to different files than you might expect.

The Apache web server also has a tool called suexec, which does a similar thing. If you're familiar with suexec, just think of CGIWrap as the same thing.

PHP

While often not considered a CGI, PHP at SCCC is run as a CGI and through CGIWrap. We do some server magic to make it transparent to the user. Importantly, sessions will not work in the default way. I have an older document here that discusses PHP at SCCC.

Benefits

Under a normal non-CGIWrap web servers, you need to make your files readable by everyone and any files you want your script to be able to write to have to be world-writable. This is terrible for security. With CGIWrap, you can make files readable by the file owner only and it will work. This is especially important with files that contain secret information, like database passwords.


CategoryDocs

CGIWrap (last edited 2009-07-06 04:35:58 by dmartin)