Change ownership or permissions on only directories or files, recursively

For files:

$ find /path/to/directory -type f -print0 | xargs -0 chmod 664

For directories:

$ find /path/to/directory -type d -print0 | xargs -0 chmod 775

As a supplement to ErikA's answer, if I were to guess the reason you wanted to do this, you were looking to add the write bit for "group". If that's the case, you can avoid the two-command dance and just run:

chmod -R g+w /path/to/directory