using find and chmod together in Unix

In Unix, if you need to clear up a set of subdirectories to see what permissions or ownership of everything under a given directory, these commands work for me on Solaris. There are differences because you don’t want to give execute permissions to files. And these commands assume that none of the files need to be executable.

Directories

This command finds and lists owner, group and permisions for all directories beneath the current directory.
find . -type d -exec ls -algd {} \;

This command changes the permissions of all of them. Obviously, only use 775 if those are the permissions you want to give.
find . -type d -exec chmod 775 {} \;

Files

This command finds and lists owner, group and permisions for all files beneath the current directory.

find . -type f -exec ls -alg {} \;

This command changes the permissions of all of them. Obviously, only use 664 if those are the permissions you want to give.

find . -type f -exec chmod 664 {} \;

Alternative Syntax

If you only need to change permissions within a single directory and not all subdirectories these commands will work as well:

This command will change the permissions of all files in the current directory to 664
chmod 664 *

Immediately followed by this command:
chmod 775 */

which will change the permissions of all directories to 775