Proper CHMOD settings for CGI script's data files...

I've written a CGI script that allows visitors to my site to leave me a message, and I can later log into the script and view the notes left to me. (Basically, it's a way to receive feedback without providing my e-mail address to the world and, more specifically, spambots.) Additionally, the script supports multiple users, since I have several writers for the site, and each can receive feedback individually. The directory structure looks like this:

/
|- messenger/
---- |- messenger.cgi
---- | - users/
--------- | - Username/
------------------| Username.data
------------------| messages.txt

So, say there's user Foo... Foo's login name and password would be stored in http://www.mysite.com/messenger/users/Foo/Foo.data and his messages in http://www.mysite.com/messenger/users/Foo/message.txt.

My question is, what CHMOD settings should I use to make these files inaccessible to the public, but still readable and writable for the script? Right now, I've just password protected the Users/ folder, but don't want to stick with that solution.

 

 

 

 

Top