does PHP write as root? i'm asking because i start my webserver as root and it's the webserver that calls on PHP........
i'm asking for a security reason. in the case that i did some VERY bad programming such as allowing users to choose the name of the file to save as and they entered something like ../../etc/passwd (/var/www/../../etc/passwd lists all users, home directories and default shells)
now if php runs as the user php or some other non-superuser, it would not be able to write but if it runs as root i would be fudged.