find /path/to/base/dir -type d -exec chmod 770 {} +
find /path/to/base/dir -type f -exec chmod 660 {} +