title: OperationalError: could not connect to server: Permission denied tTCP/IP connections on port 5432?
body: <p>I can able to connect postgres from terminal as well as python manage.py dbshell command</p>
  
  <p>But when i'm trying to connect from apache i'm Getting error as follows.</p>
  
  <pre><code>Error : OperationalError: could not connect to server: Permission denied
  Is the server running on host "192.168.1.10" and accepting 
  TCP/IP connections on port 5432?
  </code></pre>
  
  <p>My listen Address on postgress conf file is 192.168.1.10 Address</p>
  
  <p>pg_hg_cong allowed host all all 192.168.0.0/24 trust</p>
  
  <p>And also selinux turned httpd_can_network_connect_db on </p>
  
  <p>Port is listening on 192.168.1.10:5432 on netstat output.</p>
  
  <p>And database's are storing in /tmp directory   </p>
  
  <pre><code>wxrwxrwx.  1 postgres postgres     0 Dec 18 07:40 .s.PGSQL.5432
  -rw-------.  1 postgres postgres    50 Dec 18 07:40 .s.PGSQL.5432.lock
  </code></pre>