777 for directories works and is necessary, if your server has php running as 'nobody'

files would be 666 then too

if the server has suPhp or is running php as fcgi, then you don't have to go that far and 755, 644 would be good smile