As I have been struggling with this for a long time and haven't been able to find the answer anywhere, but found it due to the help of @ Deadooshka in a not so related post, I'll leave my question and answer here.
For me the solution what that the
/etc/ssl folder needed execute permission. I have no idea where this has gone wrong, but the solution for me was the following:
$ /etc # chmod o+x ssl
When the permissions were wrong, I could not read the certificate file using
file_get_contents(/etc/ssl/certs/ca-certificates.crt) in a PHP script in the web root, executed from the browser. After the fix, the file was read.