Permissions necessary for CGI to create files
Posted on 2001-07-17
I would like to have a perl cgi script that will create a text file. I found that my script can do this easily if the document root has full permissions (chmod 777) but I don't think that this is a good idea to leave full permission open, right? This is the basic structure of my web:
The absolute path is /home/sites/site1/users/~user1/
The web document root is /~user1/web/
location of cgi-bin is inside of /web like this
My question is this, what should the permissions be for the document root and the cgi-bin to allow my cgi script to be able to create files and read files. I am using the HTTP_REFERRER env var to check and make sure the cgi-script can only be run from my site.
Thanks for your help