<?xml version="1.0"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>CKAN: Ticket #1385: Resolve postgres permissions issues</title>
    <link>http://localhost/ticket/1385</link>
    <description>&lt;p&gt;
Currently there is a problem because the docs guide us to set the sqlalchemy url to use 'localhost' i.e. loopback, whereas paster commands don't specify '-h localhost' so use unix sockets (you need to do 'sudo -u postgres'). These should be the same.
&lt;/p&gt;
&lt;p&gt;
Also do we need to tell people to add a line to their postgres authentication config /etc/postgresql/8.4/main/pg_hba.conf
to help things? Florian suggests:
&lt;/p&gt;
&lt;pre class="wiki"&gt;local   std         std                          md5
&lt;/pre&gt;&lt;p&gt;
/etc/postgresql/8.4/main/pg_hba.conf
&lt;/p&gt;
</description>
    <language>en-us</language>
    <image>
      <title>CKAN</title>
      <url>http://assets.okfn.org/p/ckan/img/ckan_logo_shortname.png</url>
      <link>http://localhost/ticket/1385</link>
    </image>
    <generator>Trac 0.12.3</generator>
    <item>
      
        <dc:creator>dread</dc:creator>

      <pubDate>Wed, 12 Oct 2011 11:32:39 GMT</pubDate>
      <title>cc set</title>
      <link>http://localhost/ticket/1385#comment:1</link>
      <guid isPermaLink="false">http://localhost/ticket/1385#comment:1</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;cc&lt;/strong&gt;
              &lt;em&gt;florian.marienfeld@…&lt;/em&gt; added
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
Another change needed for this (via Florian):
&lt;/p&gt;
&lt;pre class="wiki"&gt;diff -r 6f27828a4621 ckan/lib/cli.py
--- a/ckan/lib/cli.py	Wed Oct 12 11:10:32 2011 +0100
+++ b/ckan/lib/cli.py	Wed Oct 12 12:23:18 2011 +0100
@@ -132,7 +132,7 @@
         pg_cmd += ' -U %(db_user)s' % self.db_details
         if self.db_details.get('db_pass') not in (None, ''):
             pg_cmd = 'export PGPASSWORD=%(db_pass)s &amp;amp;&amp;amp; ' % self.db_details + pg_cmd
-        if self.db_details.get('db_host') not in (None, '', 'localhost'):
+        if self.db_details.get('db_host') not in (None, ''):
             pg_cmd += ' -h %(db_host)s' % self.db_details
         if self.db_details.get('db_port') not in (None, ''):
             pg_cmd += ' -p %(db_port)s' % self.db_details
&lt;/pre&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>dread</dc:creator>

      <pubDate>Tue, 10 Jan 2012 18:05:03 GMT</pubDate>
      <title>status changed; resolution set</title>
      <link>http://localhost/ticket/1385#comment:2</link>
      <guid isPermaLink="false">http://localhost/ticket/1385#comment:2</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;
                changed from &lt;em&gt;new&lt;/em&gt; to &lt;em&gt;closed&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;resolution&lt;/strong&gt;
                set to &lt;em&gt;fixed&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
This patch has gone in (aimed for CKAN 1.5.2) [master 5b518e5].
&lt;/p&gt;
&lt;p&gt;
Regarding setup to use unix sockets (as opposed to the loopback), I'm not keen, since it requires an extra step in editing the postgres config, for a barely noticeable performance improvement. Thanks for alerting us to it though, Florian.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item>
 </channel>
</rss>