linux chmod all directories and subdirectories but not files code example
Example 1: chmod just directories
find /path/to/base/dir -type d -exec chmod 755 {} +
Example 2: chmod just directories
find /path/to/base/dir -type f -exec chmod 644 {} +