ch mod files in folder but not subfolder 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 {} +
find /path/to/base/dir -type d -exec chmod 755 {} +
find /path/to/base/dir -type f -exec chmod 644 {} +