linux change permissions recursive only directories code example
Example 1: chmod folder recursive
chmod -R MODE DIRECTORY
#Example
chmod -R 755 /var/www/html
Example 2: chmod just directories
find /path/to/base/dir -type f -exec chmod 644 {} +