[ckan-dev] Dataset upload error
Nigel Babu
nigel.babu at okfn.org
Wed Feb 12 10:20:44 UTC 2014
Hi Cliff,
I can't work out what exactly is wrong. But, I think the best solution is
to delete the database and users for datastore and starting over.
Nigel Babu
Developer | @nigelbabu <https://twitter.com/nigelbabu>
The Open Knowledge Foundation <http://okfn.org/>
Empowering through Open Knowledge
http://okfn.org/ | @okfn <http://twitter.com/OKFN> | OKF on
Facebook<https://www.facebook.com/OKFNetwork> |
Blog <http://blog.okfn.org/> | Newsletter<http://okfn.org/about/newsletter>
CKAN | http://ckan.org/ | @CKANproject
<http://twitter.com/CKANproject> |the world’s leading open-source data
portal platform
On 6 February 2014 19:58, Cliff Ingham <inghamn at bloomington.in.gov> wrote:
> I finally found the _table_metadata table. It's in the datastore
> database. According to the documentation, this should be owned by the
> writeuser, which it was.
>
> I had to grant select permission on that table to the readonly user. I
> don't think the datastore setup script set this correctly.
>
> Other than the possible problem with the datastore database setup
> script, I think this is just documentation confusion - especially given
> that I am new to Python applications and Postgresql.
>
> On 02/06/2014 04:34 AM, Nigel Babu wrote:
> > Hi Cliff,
> >
> > I have a few questions for you that might help us debug your situation a
> > bit better.
> > * Does the db user used to connect to the database own the database used
> > for CKAN?
>
> Which db user and which database?
>
> > * Did you create the database using the steps described in the
> > documentation?
> > * What version of CKAN are you on?
> This is a source install, cloned from the master branch. (Yes, I know
> there could be problems) However, this was not something that was
> expected to be broken. I just recently upgraded to the latest commit,
> as of sometime on Tuesday.
>
> > * Do you have any custom extensions enabled?
> No, nothing custom:
> ckan.plugins = stats text_preview recline_preview datastore datapusher
> spatial_metadata spatial_query
> >
> >
> > Nigel Babu
> >
> > Developer | @nigelbabu <https://twitter.com/nigelbabu>
> >
> > The Open Knowledge Foundation <http://okfn.org/>
> >
> > Empowering through Open Knowledge
> >
> > http://okfn.org/ | @okfn <http://twitter.com/OKFN> | OKF on
> > Facebook<https://www.facebook.com/OKFNetwork> |
> > Blog <http://blog.okfn.org/> | Newsletter<
> http://okfn.org/about/newsletter>
> >
> > CKAN | http://ckan.org/ | @CKANproject
> > <http://twitter.com/CKANproject> |the world’s leading open-source data
> > portal platform
> >
> >
> > On 5 February 2014 22:44, Cliff Ingham <inghamn at bloomington.in.gov>
> wrote:
> >
> >> I am getting a postgresql error when attempting to upload a file for a
> >> dataset.
> >>
> >> (ProgrammingError) permission denied for relation _table_metadata
> >>
> >> I have tried the Alter Table command as described from an older email in
> >> this mailing list:
> >> https://lists.okfn.org/pipermail/ckan-dev/2012-October/003227.html
> >>
> >> ALTER DEFAULT PRIVILEGES FOR USER "{writeuser}" IN SCHEMA public
> >> GRANT SELECT ON TABLES TO "{readonlyuser}";
> >>
> >> But still, no luck. I am unfamiliar with Postgres and am not sure where
> >> the _table_metadata table is. (This is my first use of Postgres, I have
> >> only use MySQL, Oracle, and MSSql before.)
> >>
> >> Here's the full error from the log:
> >>
> >> (ProgrammingError) permission denied for relation _table_metadata
> >> 'SELECT 1 FROM "_table_metadata" WHERE name = %s AND alias_of IS NULL'
> >> (u'2bba4af2-95e4-43c4-b555-970d0d59a10d',)
> >> Traceback (most recent call last):
> >> File "/srv/sites/ckan/python_env/src/ckan/ckan/model/modification.py",
> >> line 79, in notify
> >> observer.notify(entity, operation)
> >> File
> >> "/srv/sites/ckan/python_env/src/ckan/ckan/lib/search/__init__.py", line
> >> 128, in notify
> >> {'id': entity.id}),
> >> File "/srv/sites/ckan/python_env/src/ckan/ckan/logic/__init__.py",
> >> line 419, in wrapped
> >> result = _action(context, data_dict, **kw)
> >> File "/srv/sites/ckan/python_env/src/ckan/ckan/logic/action/get.py",
> >> line 856, in package_show
> >> resource_dict = item.before_show(resource_dict)
> >> File
> >> "/srv/sites/ckan/python_env/src/ckan/ckanext/datastore/plugin.py", line
> >> 245, in before_show
> >> resource_dict['id']
> >> File
> >>
> >>
> "/srv/sites/ckan/python_env/lib/python2.7/site-packages/sqlalchemy/engine/base.py",
> >> line 1449, in execute
> >> params)
> >> File
> >>
> >>
> "/srv/sites/ckan/python_env/lib/python2.7/site-packages/sqlalchemy/engine/base.py",
> >> line 1628, in _execute_text
> >> statement, parameters
> >> File
> >>
> >>
> "/srv/sites/ckan/python_env/lib/python2.7/site-packages/sqlalchemy/engine/base.py",
> >> line 1698, in _execute_context
> >> context)
> >> File
> >>
> >>
> "/srv/sites/ckan/python_env/lib/python2.7/site-packages/sqlalchemy/engine/base.py",
> >> line 1691, in _execute_context
> >> context)
> >> File
> >>
> >>
> "/srv/sites/ckan/python_env/lib/python2.7/site-packages/sqlalchemy/engine/default.py",
> >> line 331, in do_execute
> >> cursor.execute(statement, parameters)
> >> ProgrammingError: (ProgrammingError) permission denied for relation
> >> _table_metadata
> >> 'SELECT 1 FROM "_table_metadata" WHERE name = %s AND alias_of IS NULL'
> >> (u'2bba4af2-95e4-43c4-b555-970d0d59a10d',)
> >> Error - <class 'sqlalchemy.exc.ProgrammingError'>: (ProgrammingError)
> >> permission denied for relation _table_metadata, referer:
> >>
> >>
> http://rogue.bloomington.in.gov/ckan/dataset/new_resource/video-services-franchise-revenue-history
> >> 'SELECT 1 FROM "_table_metadata" WHERE name = %s AND alias_of IS NULL'
> >> (u'2bba4af2-95e4-43c4-b555-970d0d59a10d',), referer:
> >>
> >>
> http://rogue.bloomington.in.gov/ckan/dataset/new_resource/video-services-franchise-revenue-history
> >> --
> >> Cliff Ingham
> >> http://www.ohloh.net/accounts/inghamn
> >> _______________________________________________
> >> ckan-dev mailing list
> >> ckan-dev at lists.okfn.org
> >> https://lists.okfn.org/mailman/listinfo/ckan-dev
> >> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
> >>
> >
> >
> >
> > _______________________________________________
> > ckan-dev mailing list
> > ckan-dev at lists.okfn.org
> > https://lists.okfn.org/mailman/listinfo/ckan-dev
> > Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
> >
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20140212/b7fd352e/attachment-0003.html>
More information about the ckan-dev
mailing list