This is just a quick answer to the user question. Generally someone on a web page is a user called "nobody" but this changes with different ISP's, and you'll need to check with yours to see what that user is. The Nobody person is restricted in many ways by the webserver software engine. Most of my experience is with Apache servers by the way.
If you are going to create files that need to be accessed by someone on a web page, then that's the user id the file needs to be created on. CHOWN will do that for you.
666 generally works with most files, make sure that the file is in a directory that is accessable by the web user, not just the script accessing it. This directory should be under the area the web page runs from. Otherwise you will run into access denide errors.
If you create a directory for this, make sure the permissions are okay on the directory itself. 777 is generally okay for directories, but never for files accessed by web users. I would suggest 744 for files that don't require writing acces (and none of them should) on a web site. But that's just my personal belief system there, and there are reasons for alterations.
Hope that helps, probably some of the other monks around here will send some pointers to where you can find more information on file setting and such. I know there is a good
CGI write up on the subject.
and you might want to take a look at this site
CGI Tutorial
webadept
My Husband ran off with my shawman, but they love me as I am -- Tori Amos