chmod for folders 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 d -exec chmod 755 {} +
Example 3: chmod just directories
find /path/to/base/dir -type f -exec chmod 644 {} +