This is my little permissions fix script. Its great for folders that apache serves from.
#/bin/bash
if [[ "$1" == "" ]]
then
echo "Fix Web Permissions Script - Tim 10/09/2007"
echo "Recursively changes permissions on folders 775 and files 664"
echo "Usage: fixperms <user:group> <folder>"
else
chown -R $1 $2
find $2 \( -type d -exec chmod 755 '{}' \; \) -o \( -type f -exec chmod 644 '{}' \; \)
fi