Getting error - unable to read oaprivate.key after upgrading to 7.0.0

Situation
I upgraded OpenEMR from 6.10 to 7.00. After the upgrade, whenever trying to get a new API token, getting following exception:

br />
Fatal error: Uncaught LogicException: Key path
"file:///var/www/html/openemr/sites/default/documents/certificates/oaprivate.key" does not exist or is not
readable in /var/www/html/openemr/vendor/league/oauth2-server/src/CryptKey.php:59
Stack trace:
#0 /var/www/html/openemr/src/RestControllers/AuthorizationController.php(609):
League\OAuth2\Server\CryptKey->__construct()
#1 /var/www/html/openemr/src/RestControllers/AuthorizationController.php(1066):
OpenEMR\RestControllers\AuthorizationController->getAuthorizationServer()
#2 /var/www/html/openemr/oauth2/authorize.php(73):
OpenEMR\RestControllers\AuthorizationController->oauthAuthorizeToken()
#3 {main}
thrown in /var/www/html/openemr/vendor/league/oauth2-server/src/CryptKey.php on line 59

OpenEMR Version
I’m using OpenEMR version
7.0.0

Browser:
I’m using:
From Postman

Operating System
I’m using:

Logs
Did you check the logs?
Was there anything pertinent in them?
Please paste them here (surround with three backticks (```) for readability.
You can also turn on User Debugging under Administration->Globals->Logging User Debugging Options=>All

Update: it seems to be an issue with file permission. I changed the permission to 666. After that I was able to get the token but got the following error. Earlier, the permissions were 600.

Key file “file:///var/www/html/openemr/sites/default/documents/certificates/oaprivate.key” permissions are not correct, recommend changing to 600 or 660 instead of 666

For Windows this mostly always shows. However, keys will still be generated with this permission.