<div dir="ltr">Hello Tatsuo,<div><br></div><div>Thank you very much, that did the trick! I think I was assuming that the &quot;open&quot; 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&#39;m a little bit curious since in my mind the less permissions a process needs the better and I just can&#39;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">&lt;<a href="mailto:ishii@postgresql.org" target="_blank">ishii@postgresql.org</a>&gt;</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>
&gt; Hi all,<br>
&gt;<br>
&gt; I&#39;m currently having trouble with md5 auth on my current configuration, and<br>
&gt; having looked everywhere with no luck I&#39;m now asking for some help.<br>
&gt;<br>
&gt; I was already able to use pgpool using &quot;trust&quot; auth mode on pgpool and<br>
&gt; backends but when switching to md5 mode I&#39;m unable to login as the<br>
&gt; following error message appears:<br>
&gt;<br>
&gt; psql: ERROR:  &quot;MD5&quot; authentication with pgpool failed for user &quot;postgres&quot;<br>
&gt;<br>
&gt; Looking at pgpool logs I found the following interesting lines:<br>
&gt;<br>
&gt; (when booting pgpool):<br>
&gt;<br>
&gt; pool_init_pool_passwd: couldn&#39;t open /etc/pgpool2/pool_passwd. reason:<br>
&gt; Permission denied<br>
&gt;<br>
&gt; (Later, when trying to connect):<br>
&gt; pool_init_pool_passwd: couldn&#39;t open /etc/pgpool2/pool_passwd. reason:<br>
&gt; Permission denied<br>
&gt; pool_get_passwd: passwd_fd is NULL<br>
&gt; &quot;MD5&quot; authentication with pgpool failed for user &quot;postgres&quot;<br>
&gt;<br>
&gt; I double checked pgpool.cong, pool_hba.conf and pool_passwd and everything<br>
&gt; looked fine. Trying some brute-force I run pgpool as the root user and md5<br>
&gt; auth works OK. Given this, I supposed the issue was with file permissions<br>
&gt; but I checked pool_passwd and was readable by the postgres user, which is<br>
&gt; whom own the pgpool process when md5 auth doesn&#39;t work (I&#39;m running pgpool<br>
&gt; as a &quot;service&quot; on Debian wheezy via /etc/init.d/pgpool start). I tried to<br>
&gt; confirm again that the postgres user is able to read pool_passwd and doing<br>
&gt; a &quot;sudo su -c &#39;cat /etc/pgpool2/pool_passwd&#39; postgres&quot; works ok.<br>
&gt;<br>
&gt; TL;DR: When running pgpool as root md5 auth works, when not, md5 auth<br>
&gt; doesn&#39;t and pgpool complains &quot;permission_denied&quot; to pool_passwd despite<br>
&gt; having access to it.<br>
&gt;<br>
&gt; Could anyone tell me please if I am missing something? Is there a way to<br>
&gt; debug this? BTW I&#39;m using pgpool provided by pgdg apt repository (<br>
&gt; <a href="https://wiki.postgresql.org/wiki/Apt" target="_blank">https://wiki.postgresql.org/wiki/Apt</a>)<br>
&gt;<br>
&gt; Thanks!<br>
&gt;<br>
&gt; Camilo<br>
</div></div></blockquote></div><br></div>