alex@alex:/var/www/html/magento2.2$ php bin/magento module:enable Yang_HelloWorld
The file "/var/www/html/magento2.2/generated/code/Magento/Theme/Model/ResourceModel/Theme/Collection/Proxy.php" cannot be deleted Warning!unlink(/var/www/html/magento2.2/generated/code/Magento/Theme/Model/ResourceModel/Theme/Collection/Proxy.php): Permission denied
alex@alex:/var/www/html/magento2.2$ sudo chown -R www-data:www-data /var/www/html/magento2.2
alex@alex:/var/www/html/magento2.2$ sudo chmod -R 777 /var/www/html/magento2.2
alex@alex:/var/www/html/magento2.2$ sudo chmod -R 777 var/ pub/ alex@alex:/var/www/html/magento2.2$ php bin/magento module:enable Yang_HelloWorld
The following modules have been enabled:
- Yang_HelloWorld
To make sure that the enabled modules are properly registered, run 'setup:upgrade'.
Cache cleared successfully.
Generated classes cleared successfully. Please run the 'setup:di:compile' command to generate classes.
Info: Some modules might require static view files to be cleared. To do this, run 'module:enable' with the --clear-static-content option to clear them.