Change file permissions recursively for directories only in a Unix-like environment.
find /DIRECTORY -type d -exec chmod 755 {} ;
Adjust -type d to -type f to target files exclusively