file permissions in php
I'm writing a content management system and need to be able to create .php files, with a php script. But when I try to open a file for writing/create a file, it says I don't have permission to do it. I'm not super sure how to change the permissions, but more importantly I wonder whether doing so would make me vulnerable to people hacking the site.
Basically, there is a password protected directory that acts as an area where the site owners can log in and work with the CMS. (Very few people have access to this directory.) I need my php code in this area to be able to create a file, which would be a php webpage, in the directory containing the website pages visitors see. Is there a safe way to do this with a php script, which wouldn't force me to allow anyone in the world to write to files on my site?
I really appreciate any help on this - I'm stuck!
|