Chmod просто каталоги
find /path/to/base/dir -type f -exec chmod 644 {} +
Angry Anaconda
find /path/to/base/dir -type f -exec chmod 644 {} +
find /path/to/base/dir -type d -print0 | xargs -0 chmod 755
find /path/to/base/dir -type f -print0 | xargs -0 chmod 644