[ckan-dev] datastore: permission denied Schema public

Dominik Moritz dominik.moritz at okfn.org
Tue Mar 26 10:06:55 UTC 2013


Hallo Ralf,

We expect a permission error because there should be a connection that is not allowed to write. However, the check only works if the error message is in english, otherwise an exception is raised. 

There is an issue and a pull request at https://github.com/okfn/ckan/pull/642.

Until this fix is in the release branch, you could set the language of your postgres installation to english. 

Best wishes,
Dominik

On 25 Mar 2013, at 17:28, User66 <user66 at arcor.de> wrote:

> Hi,
> 
> I today installed CKAN 2.1a freshly from master branch (commit 818e60588485938a15f2552e26e2cb2972704643 from 21.03.2013). So far my basic installation works.
> 
> But I am not able to activate the datastore plugin. I have set it up according to http://docs.ckan.org/en/latest/datastore-setup.html with "ckanuser" as write-user. Apache gives following error:
> 
> #####################
> [Mon Mar 25 17:12:37 2013] [error] [client 192.168.1.3] mod_wsgi (pid=26913): Target WSGI script '/opt/ckan/pyenv/src/ckan/bin/xxx.de.py' cannot be 
> loaded as Python module.
> [Mon Mar 25 17:12:37 2013] [error] [client 192.168.1.3] mod_wsgi (pid=26913): Exception occurred processing WSGI script '/opt/ckan/pyenv/src/ckan/bin/xxx.de.py'.
> [Mon Mar 25 17:12:37 2013] [error] [client 192.168.1.3] Traceback (most recent call last):
> [Mon Mar 25 17:12:37 2013] [error] [client 192.168.1.3] File "/opt/ckan/pyenv/src/ckan/bin/xxx.de.py", line 11, in <module>
> [Mon Mar 25 17:12:37 2013] [error] [client 192.168.1.3] application = loadapp('config:%s' % config_filepath)
> [Mon Mar 25 17:12:37 2013] [error] [client 192.168.1.3] File "/opt/ckan/pyenv/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
> [Mon Mar 25 17:12:37 2013] [error] [client 192.168.1.3] return loadobj(APP, uri, name=name, **kw)
> [Mon Mar 25 17:12:37 2013] [error] [client 192.168.1.3] File "/opt/ckan/pyenv/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 272, in loadobj
> [Mon Mar 25 17:12:37 2013] [error] [client 192.168.1.3] return context.create()
> [Mon Mar 25 17:12:37 2013] [error] [client 192.168.1.3] File "/opt/ckan/pyenv/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 710, in create
> [Mon Mar 25 17:12:37 2013] [error] [client 192.168.1.3] return self.object_type.invoke(self)
> [Mon Mar 25 17:12:37 2013] [error] [client 192.168.1.3] File "/opt/ckan/pyenv/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 146, in invoke
> [Mon Mar 25 17:12:37 2013] [error] [client 192.168.1.3] return fix_call(context.object, context.global_conf, **context.local_conf)
> [Mon Mar 25 17:12:37 2013] [error] [client 192.168.1.3] File "/opt/ckan/pyenv/lib/python2.7/site-packages/paste/deploy/util.py", line 56, in fix_call
> [Mon Mar 25 17:12:37 2013] [error] [client 192.168.1.3] val = callable(*args, **kw)
> [Mon Mar 25 17:12:37 2013] [error] [client 192.168.1.3] File "/opt/ckan/pyenv/src/ckan/ckan/config/middleware.py", line 54, in make_app
> [Mon Mar 25 17:12:37 2013] [error] [client 192.168.1.3] load_environment(conf, app_conf)
> [Mon Mar 25 17:12:37 2013] [error] [client 192.168.1.3] File "/opt/ckan/pyenv/src/ckan/ckan/config/environment.py", line 349, in load_environment
> [Mon Mar 25 17:12:37 2013] [error] [client 192.168.1.3] plugin.configure(config)
> [Mon Mar 25 17:12:37 2013] [error] [client 192.168.1.3] File "/opt/ckan/pyenv/src/ckan/ckanext/datastore/plugin.py", line 66, in configure
> [Mon Mar 25 17:12:37 2013] [error] [client 192.168.1.3] self._check_read_permissions()
> [Mon Mar 25 17:12:37 2013] [error] [client 192.168.1.3] File "/opt/ckan/pyenv/src/ckan/ckanext/datastore/plugin.py", line 166, in _check_read_permissions
> [Mon Mar 25 17:12:37 2013] [error] [client 192.168.1.3] read_connection.execute(sql)
> [Mon Mar 25 17:12:37 2013] [error] [client 192.168.1.3] File "/opt/ckan/pyenv/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1449, in execute
> [Mon Mar 25 17:12:37 2013] [error] [client 192.168.1.3] params)
> [Mon Mar 25 17:12:37 2013] [error] [client 192.168.1.3] File "/opt/ckan/pyenv/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1628, in _execute_text
> [Mon Mar 25 17:12:37 2013] [error] [client 192.168.1.3] statement, parameters
> [Mon Mar 25 17:12:37 2013] [error] [client 192.168.1.3] File "/opt/ckan/pyenv/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1698, in _execute_context
> [Mon Mar 25 17:12:37 2013] [error] [client 192.168.1.3] context)
> [Mon Mar 25 17:12:37 2013] [error] [client 192.168.1.3] File "/opt/ckan/pyenv/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1691, in _execute_context
> [Mon Mar 25 17:12:37 2013] [error] [client 192.168.1.3] context)
> [Mon Mar 25 17:12:37 2013] [error] [client 192.168.1.3] File "/opt/ckan/pyenv/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 331, in do_execute
> [Mon Mar 25 17:12:37 2013] [error] [client 192.168.1.3] cursor.execute(statement, parameters)
> [Mon Mar 25 17:12:37 2013] [error] [client 192.168.1.3] ProgrammingError: (ProgrammingError) FEHLER: keine Berechtigung f\xc3\xbcr Schema public
> [Mon Mar 25 17:12:37 2013] [error] [client 192.168.1.3] 'CREATE TABLE public._bar (id INTEGER, name VARCHAR)' {}
> #####################
> 
> The 2nd line from bottom says "ERROR: no permission for Schema public" (it's in German).
> 
> I have set the permissions using all of the three described options (and tested in between). No luck. From my perspective the schema permissions should be fine. Is there something I am missing or is the datastore not fully integrated into the actual master branch?
> 
> My system:
> openSUSE 12.3
> postgresql 9.2.3
> Apache 2.2.22
> mod_wsgi-3.3
> 
> Thanks in advance
> Ralf
> 
> 
> 
> _______________________________________________
> 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





More information about the ckan-dev mailing list