Look at http://perl.linuxempire.net/save_perm, and http://perl.linuxempire.net/restore_perm, those are two scripts I used to fix a recursive 'chmod 000 *' on a development websevrer I have. :( save_perm has a very nice recursive subroutine, it's not leaky with global vars, it calls itself and returns to itself. Written with the help of 4 cans of mountain dew. :)
Hummm! I might just do that! I have a staging site on which all of my permissions are set to 666 and 777 because of the user/group that runs the httpd daemon.
Every once in a while, I copy everything on to the deployment site and forget to reset the permissions. It would be nice to have something in the crontab that would keep me from having to do this.