Today I got a call from a client having 500 error on their WordPress website and cannot access the admin dashboard.
I checked the web server error log and it says that wp-config.php failed to open stream: Permission denied
For security issues, we set our wp-config.php permission to 600.
This typically occurs when scripts are being executed with the permissions of the apache user, "nobody", instead of the owner of the scripts ( the cPanel user ).
We had this issue with the recent Cpanel software update. To fix the issue we installed mod_ruid2.
If you don't have root access to your hosting an easy fix is to set permission for wp-config.php to 644.