Bug: the console commands fail with the message «Command line user may not have proper read+execute permissions for directories under "var/generation/"» when the «var/generation» directory is absent

https://github.com/magento/magento2/blob/255ceb/lib/internal/Magento/Framework/Console/Cli.php#L55-L65


https://github.com/magento/magento2/blob/255ceb/lib/internal/Magento/Framework/Setup/FilePermissions.php#L215-L235

The requirement for the var/generation directory to be present is a bug, because the directory is autogenerated.

See also:

A quick way to fix this is to command out the || !is_executable($dir) rule

Yes, I have mentioned it here: Bug: \Magento\Framework\Setup\FilePermissions::checkDirectoryPermissionForCLIUser() fails on Windows (wrongly detects whether a directory is executable)

The bug has been fixed yesterday:
https://github.com/magento/magento2/commit/4733c43d46330bfc815521c52982eab658a73014