Permission problems often encountered by magento2

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.

Php
Mar.02,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e58b4b-454df.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e58b4b-454df.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?