Matt Palermo wrote:
I need this newly created file to have write permissions - chmod 777.

First, if you just need to write to it, don't chmod it to 777 (you're giving rwx across the board doing that). Who needs to write to the file? The webserver only? Then set the permissions to 600, assuming that the user which the webserver is running as owns the file (to keep things as secure as possible, it's best not to give out more permission than is actually needed).


Next, if you're dealing with a stock install of Apache, it's probably running as 'nobody', which can give you fits. I usually create a user for Apache (user 'apache'), and set it's home to /sbin/nologin so no-one can access the machine with that account (no password). If you go this route, you'll have to edit your httpd.conf file to make apache run as the new user, and restart apache.

This is of course assuming you're running php with apache on a *nix system. :)


-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to