[ckan-dev] Problem with datastore permissions command
Sean Hammond
sean.hammond at okfn.org
Fri Jan 11 13:17:14 UTC 2013
Hey, I've been trying to follow the new datastore setup instructions
again, and I found some problems. I'll send a pull request soon for some
of them but here are three that I want to ask about:
1. The set permissions command asks for two passwords. What is the
second password??
$ paster datastore set-permissions postgres
[sudo] password for seanh:
Password:
(This also happens with command-line tool and the SQL script.)
2. The set permissions command doesn't work if the unix user
"postgres" doesn't have permissions to read (and also write?) to the
directory containing the CKAN source code. No matter what password I
give for the mystery password it asks for, I always seem to get:
An error occured: could not change directory to "/home/seanh/Projects/ckan/ckan"
exit 1
Also happens with the command-line tool and the SQL script.
This will affect any developer doing a source install as the CKAN source
install instructions tell you to install CKAN in your homedir, and I
think the "postgres" user would not normally have permission to read
your homedir. (Or is this just me?)
When I moved my CKAN install to /tmp/ckan so anyone could read it, then
the command succeeded:
$ paster datastore set-permissions postgres
[sudo] password for seanh:
Password:
Set permissions for read-only user: SUCCESS
$ _
Maybe we need to add something in the instructions, explaining that the
"postgres" user needs to have permission to read the CKAN dir?
Also, is it really necessary to set these permissions for a dev install?
Could the set permission section of the instruction be marked as only
needed for production deployments?
3. Even after getting the datastore setup correctly (I think) I still
have two tests failing:
ERROR: ckanext.datastore.tests.test_create.TestDatastoreCreate.test_create_requires_auth
File "/tmp/foo/src/ckan/ckanext/datastore/tests/test_create.py", line 43, in test_create_requires_auth
AppError: Bad response: 200 OK (not 403)
ERROR: ckanext.datastore.tests.test_upsert.TestDatastoreUpsert.test_upsert_requires_auth
File "/tmp/foo/src/ckan/ckanext/datastore/tests/test_upsert.py", line 65, in test_upsert_requires_auth
AppError: Bad response: 200 OK (not 403)
Is this a bug? Or is my setup wrong?
Thanks
More information about the ckan-dev
mailing list