I recently needed to change the permissions of all files inside a directory (only files but not folders), including subdirectories. From the command line in Mac OS X, I ran this command with success which changed all files recursively to 666 (rw-rw-rw-):
sudo find . -type f -exec chmod 666 {} \;
Likewise, to change only directories to 777 (rwxrwxrwx), I used:
sudo find . -type d -exec chmod 775 {} \;