Magento 2.3.6 Not Able To Login To Admin Panel

When I log in to Magento 2.3.6 and Magento 2.3.7 admin panel, I got the following errors:

[2021-05-28 10:55:49] main.CRITICAL: The stream or file "/home/www.cheapglasses123.com//var/log/system.log" could not be opened in append mode: failed to open stream: Permission denied {"exception":"[object] (UnexpectedValueException(code: 0): The stream or file \"/home/www.cheapglasses123.com//var/log/system.log\" could not be opened in append mode: failed to open stream: Permission denied at /home/www.cheapglasses123.com/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:110)"} []

We need to set the right Permissions for the directory, we can try this Command form SSH

Run the following command:

chmod -R 777 pub; chmod -R 777 var; chmod -R 777 app/etc

 

We also can try:

bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy -f
chmod -R 777 var pub generated