Sometimes you need to set o+x to all sub directories recursively, but don’t want to set that for any files. ( chmod -R o+x * is overkill…) Here is how.

find dir -type d -exec chmod o+x {} ';'

Similarly you can set permissions for all files under the sub-directories.

find dir -type f -exec chmod o+r {} ';'

ref link: http://superuser.com/questions/208606/how-to-change-file-permissions-for-a-directory-in-one-command