After setting up LAMP (on Debian) and then looking at /var/www/html's permissions, I was surprised that it is only writeable by root (drwxr-xr-x 1 root root).
Presumably PHP scripts can create files in /var/www/html, but surely a PHP script (or it's interpreter) doesn't run in the name of root? Can anyone help me understand whatever I am misunderstanding?
EDIT:
I installed PHP with apt-get install php5-common libapache2-mod-php5 php5-mysql php5-cli