BUG #19388: Failing to connect to postgres with EACCES error - Mailing list pgsql-bugs

From PG Bug reporting form
Subject BUG #19388: Failing to connect to postgres with EACCES error
Date
Msg-id 19388-c49c361739e2eb3c@postgresql.org
Whole thread Raw
Responses Re: BUG #19388: Failing to connect to postgres with EACCES error
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      19388
Logged by:          George Nugent
Email address:      gc.nugent66@gmail.com
PostgreSQL version: 17.7
Operating system:   Linux
Description:

Running on k8s pods, I have an issue where a process cannot connect to an
Azure Postgres server due to a permission error.

1782279 1769097264.122469 openat(AT_FDCWD,
"/home/xxxxx/.postgresql/root.crl", O_RDONLY) = -1 EACCES (Permission
denied)
1782279 1769097264.122535 stat("/home/xxxxx/.postgresql/postgresql.crt",
0x7fcdd85a2de0) = -1 EACCES (Permission denied)

We use standard SSL without client certificates and the running process is
setup without a homedir for security reasons.
I noticed from the postgres source code that only ENOENT & ENOTDIR are
allowable errors but EACCES is a fail condition.
I understand the reasoning for checking for existence of certificates, but
can the Permission Denied error also be treated as "Can't get client certs,
continue to try to connect without"?





pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #19387: About Response time delay.
Next
From: Tom Lane
Date:
Subject: Re: BUG #19387: About Response time delay.