Greetings, I have a website on a shared host to which I do not have shell access. I can only upload files and extract tgz archives. When I upload my drupal directory tree and extract it, file/directory permissions are messed up. So I wrote a tiny php script to be placed in a drupal root, and will be run (like http://example.com/fixperm.php) when necessary (after an install or update). It is based on an example on php.net chmod doc page. It seems to be working well for my case, and could be useful to most shared host users I think.
My $.02, Serhat
<<attachment: fixperm.php>>