[ckan-dev] data store permission problem

Dominik Moritz dominik.moritz at okfn.org
Mon May 27 11:03:57 UTC 2013


Hi Don,

On 25 May 2013, at 18:54, Don Gourley <donald.gourley at gmail.com> wrote:

> After getting basic CKAN 2.0 working on CentOS 6, I set up the data store
> according to the directions at
> http://docs.ckan.org/en/ckan-2.0/datastore-setup.html
> 
> When I try to test my installation with this URL:
> 
> http://localhost/api/3/action/datastore_search?resource_id=_table_metadata
> 
> I get a 500 server error. In the error log:
> 
> [Sat May 25 11:47:44 2013] [error] [client 10.12.15.181] Error - <class
> 'sqlalchemy.exc.ProgrammingError'>: (ProgrammingError) permission denied
> for schema public
> [Sat May 25 11:47:44 2013] [error] [client 10.12.15.181]  'CREATE TYPE
> "nested" AS (json json, extra text)' {}

There is a known error[1] that this problem occurs the first time, you use the datastore. It should, however, work after the first query you make to the datastore. 

[1] https://github.com/okfn/ckan/issues/907

> 
> The paster set-permissions command ran without error. I had to move CKAN
> from PostgreSQL 8.4 to 9.2, and dumped and loaded the ckan database to do
> that, but the data store database was created and set up directly on the
> 9.2 database. I don't know much about the postgreSQL permissions or access
> control model, but here's what my databases look like in postgres:
> 
>                                  List of databases
>   Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access
> privileges
> -----------+----------+----------+-------------+-------------+-----------------------
> ckandb    | ckanuser | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =Tc/ckanuser
>        +
>           |          |          |             |             |
> ckanuser=CTc/ckanuser
> ckandstor | ckanuser | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =Tc/ckanuser
>        +
>           |          |          |             |             |
> ckanuser=CTc/ckanuser+
>           |          |          |             |             |
> ckandsro=c/ckanuser
> 
> 
> Any ideas where I went wrong?

I hope that running a second query will fix your problem. If not, try running the permission script again and send me the result of `\l`.

> 
> -Don

Best wishes,
Dominik

> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev

Dominik Moritz
CKAN developer  |  skype: d.moritz  |  @doobly_doo
The Open Knowledge Foundation
Empowering through Open Knowledge
http://okfn.org/  |  @okfn  |  http://ckan.org  |  @CKANproject





More information about the ckan-dev mailing list