Closed Tiago-Anastacio closed 2 years ago
Hi @Tiago-DBA ;
Again, while we could certainly change the privileges, I think there might be a better approach. I just checked and unfortunately that's not documented, which certainly explains why you missed it, that's on me...
In pg_autoctl we use the XDG Base Directory Specification to determine where to store and read our files. See for instance the following source:
And then
Given that, you can change XDG_RUNTIME_DIR to point to where you want to have the pidfile and other temporary files created for your instance, and maintain different values for different users.
I'm going to leave that issue opened with the following items to solve:
How would you feel about contributing a PR to fix those problems?
Hi Dimitri, I think just document it should be ok. In case of adding a new parameter: I think naming should be something like RUNTIME_DIR or PID_DIR, because TMPDIR seems to refer to /tmp directory (for someone who's starting with pg_autoctl) Could you translate PR, please ?
Hi Dimitri,
pg_autoctl creates pid files on directory /tmp/pg_autoctl/mylinuxuser this user should be on linux group postgres
first user is pgappli1 (group postgres) second user is pgappli2 (group postgres)
issue: mkdir: cannot create directory ‘/tmp/pg_autoctl/pgappli2’: Permission denied
because first user (e.g. pgappli1) creates : drwxr-xr-x 1 pgappli1 postgres 32 Jun 1 16:34 pg_autoctl
please during creation switch /tmp/pg_autoctl to 775 rather than 755