Error on applying module:enable command in magento 2.1.7

I'm getting below error and have no idea why it's caused by applying a simple command like below:

bin> php magento module:enable CustomModuleExt

Version:

Magento 2.1.7

Error:

The file "/home/mywebsite/public_html/generated/code/Magento/Framework/Indexer/IndexerInterfaceFactory.php" cannot be deleted Warning!unlink(/home/mywebsite/public_html/generated/code/Magento/Framework/Indexer/IndexerInterfaceFactory.php): Permission denied

What causes this issue and how I can resolve it?

Read Entire Article