Strange permission errors in new PostgreSQL installation

The custom configuration file (postgresql.conf) pointed to a data directory that did not exist. Of course, that's a problem (which I solved by setting up the data directory), but it has nothing to do with the error printed. Once again, PostgreSQL errors not so helpful.

Update:

I got the same error when the data directory existed, but with incorrect ownership.