Gentoo Archives: gentoo-user

From: Joseph <syscon780@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] PosgreSQL - pg_hba.conf localhost access only
Date: Tue, 23 Apr 2013 22:16:24
Message-Id: 20130423221621.GE19375@syscon7.inet
In Reply to: Re: [gentoo-user] PosgreSQL - pg_hba.conf localhost access only by "J. Roeleveld"
1 On 04/23/13 20:10, J. Roeleveld wrote:
2
3 [snip]
4 >>I'm using SQL-Ledger (firefox) to access the postgresql.
5 >>Brief history:
6 >>I had a problem in the past when I upgraded to posgresql-9.1, all of a
7 >>sudden I could not access the sql-ledger.
8 >>
9 >>The solution was to add "postgres group" to apache user.
10 >>The reason for it was the change in directory permission:
11 >>
12 >>postgresql 8.x
13 >>drwxrwx--x 2 postgres postgres 4096 Dec 14 19:57 /var/run/postgresql/
14 >>
15 >>postgresql 9.x
16 >>drwxrwx--- 2 postgres postgres 4096 Dec 19 13:21 /var/run/postgresql/
17 >>
18 >>So:
19 >>groups apache
20 >>apache postgres
21 >>
22 >>groups postgres
23 >>postgres
24 >>
25 >>I hope this is correct as adding group "apache" to postgres user does
26 >>not work.
27 >>
28 >>But I just realized that any user from local network can access my
29 >>sql-ledger using browser.
30 >>--
31 >>Joseph
32 >
33 >Joseph.
34 >
35 >I am guessing Apache is running on the same machine as your Postgresql server?
36 >
37 >In this case. The connection will always originate from localhost and Postgresql is behaving as it should.
38 >
39 >You will need to secure access to the website to avoid people accessing it.
40 >
41 >Kind regards
42 >
43 >Joost Roeleveld
44
45 Yes, every machine I run has apache on it, so Postgresql server runs on it as well.
46 If I'm connecting from another network machine to a server, how does it originate from localhost?
47
48 Something is not correct.
49
50 --
51 Joseph

Replies

Subject Author
Re: [gentoo-user] PosgreSQL - pg_hba.conf localhost access only "J. Roeleveld" <joost@××××××××.org>