in reply to Writing Files Outside of My CGI-BIN
On any modern OS, your CGI program will run with a certain user ID. Just make sure that the location you want to write to is writeable by the effective user ID the script is running as. Without knowing anything about your operating system, it's hard to say exactly how to do this. On a Unix-like system, assuming you're using a plain Apache installation, the default user is "nobody", so something like this would work (for some definition of "work"):
(you would have to be the superuser to use exactly these commands, and it might not work if you have a non-default Apache installation).# chown nobody.nobody /path/where/cgi/can/write # chmod 0755 /path/where/cgi/can/write
But you really should consult the documentation on file permissions for your operating system.
If not P, what? Q maybe?