I came across a situation where I wanted to change all directory permissions to 755 and did not want to modify the file’s permissions. Use the Linux find utility to identify directories.
find /home/somedir -type d | xargs chmod -v 755
The same can be applied to just files, instead of directories.
find /home/somedir -type f | xargs chmod -v 644
