Running php as fastcgi vs Apache mod with dir permissions of 777

view full story

http://serverfault.com – Hi Im a web dev by trade not a server engineer please bear with me! I have just got a new Ubintu LAMP VPS server I am trying to configure. I understand that running php as apache-mod is fastest but to achive this I seem to have to set my directories to 777 so php can write to them. And in turn ftp can then no longer delete dirs created by php. This does not seem ideal. I understand that using fast-cgi the 'php user' and 'ftp user' are the same hence you do not get these issues and do not have to open directories to 777 to allow writing which I understand to be a security issue. So what a (HowTos)