0
votes

I have a CouchDB instance where I have created an admin user, so that way only the admin user(s) can create and delete databases. As I understand it, non-admin users are able to read and write to databases in this setup but not create them. I am able to create the database just fine as the admin user, but if I try to read from the db (via PouchDB) without the admin credentials, the response is a 401 with the message You are not authorized to access this db.

If I look at the database permissions, I see that the _admin role has been added but no other users are listed as admins or members. Therefore I would think any user should be able to read/write. Am I missing something here? Thanks for any help.

1

1 Answers

0
votes

The answer, it turns out, is that starting with (I believe) version 3.1, CouchDB is more "locked down" than previous versions like 2.x where read/write to dbs was enabled by default for anybody. I was able to fix this by setting default_security to everyone (defaults now to admin_only) in the couchdb section of the server config. Hope this helps somebody else out there.