Setup version for module is not specified – Magento 2



So, you have uploaded/installed/created a new module in Magento 2.x and when access a page after cleaning cache, it shows error: Setup version for module ‘Module’ is not specified.
You open up the module.xml file of your module and to your surprise the setup version is already specified in the config.
So, what makes this error to come out?

Another surprise for you, the error is related to the file system permission. As soon as you update the file system permission by running below command in your Magento 2 installation directory the error will disappear.
find . -type d -exec chmod 770 {} \; && find . -type f -exec chmod 660 {} \; && chmod u+x bin/magento