<div dir="ltr">Hello Tatsuo,<div><br></div><div>Thank you very much, that did the trick! I think I was assuming that the "open" message error on the log was only to read the file, not to write to it. </div><div><br></div><div>With the aim to contribute, may I ask why the process needs write permission to pool_passwd file? I'm a little bit curious since in my mind the less permissions a process needs the better and I just can't think why should it need to write to that file.</div><div><br></div><div>Thank you very much again for your help and kind response.</div><div><br></div><div>Best regards,</div><div><br></div><div>Camilo</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-03-10 19:31 GMT-03:00 Tatsuo Ishii <span dir="ltr"><<a href="mailto:ishii@postgresql.org" target="_blank">ishii@postgresql.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You need write permission of pool_passwd for pgpool process.<br>
<br>
Best regards,<br>
--<br>
Tatsuo Ishii<br>
SRA OSS, Inc. Japan<br>
English: <a href="http://www.sraoss.co.jp/index_en.php" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
Japanese:<a href="http://www.sraoss.co.jp" target="_blank">http://www.sraoss.co.jp</a><br>
<div class="HOEnZb"><div class="h5"><br>
> Hi all,<br>
><br>
> I'm currently having trouble with md5 auth on my current configuration, and<br>
> having looked everywhere with no luck I'm now asking for some help.<br>
><br>
> I was already able to use pgpool using "trust" auth mode on pgpool and<br>
> backends but when switching to md5 mode I'm unable to login as the<br>
> following error message appears:<br>
><br>
> psql: ERROR:  "MD5" authentication with pgpool failed for user "postgres"<br>
><br>
> Looking at pgpool logs I found the following interesting lines:<br>
><br>
> (when booting pgpool):<br>
><br>
> pool_init_pool_passwd: couldn't open /etc/pgpool2/pool_passwd. reason:<br>
> Permission denied<br>
><br>
> (Later, when trying to connect):<br>
> pool_init_pool_passwd: couldn't open /etc/pgpool2/pool_passwd. reason:<br>
> Permission denied<br>
> pool_get_passwd: passwd_fd is NULL<br>
> "MD5" authentication with pgpool failed for user "postgres"<br>
><br>
> I double checked pgpool.cong, pool_hba.conf and pool_passwd and everything<br>
> looked fine. Trying some brute-force I run pgpool as the root user and md5<br>
> auth works OK. Given this, I supposed the issue was with file permissions<br>
> but I checked pool_passwd and was readable by the postgres user, which is<br>
> whom own the pgpool process when md5 auth doesn't work (I'm running pgpool<br>
> as a "service" on Debian wheezy via /etc/init.d/pgpool start). I tried to<br>
> confirm again that the postgres user is able to read pool_passwd and doing<br>
> a "sudo su -c 'cat /etc/pgpool2/pool_passwd' postgres" works ok.<br>
><br>
> TL;DR: When running pgpool as root md5 auth works, when not, md5 auth<br>
> doesn't and pgpool complains "permission_denied" to pool_passwd despite<br>
> having access to it.<br>
><br>
> Could anyone tell me please if I am missing something? Is there a way to<br>
> debug this? BTW I'm using pgpool provided by pgdg apt repository (<br>
> <a href="https://wiki.postgresql.org/wiki/Apt" target="_blank">https://wiki.postgresql.org/wiki/Apt</a>)<br>
><br>
> Thanks!<br>
><br>
> Camilo<br>
</div></div></blockquote></div><br></div>