How to allow write access on system collection of a database in mongo?

吃可爱长大的小学妹 提交于 2019-12-24 05:46:07

问题


With latest meteor update, meteor is trying to do a write operation on my_database.system.dummy in my mongo database. I am using external mongo database with authentication enabled. The user I've created has full read-write access to my_database database but it can't write to my_database.system collection.

How can I allow my user to be able to write to my_database.system collection?

UPDATE I think I didn't phrased my question right. Problem is with mongo db connection. When meteor tries to connect with mongo, the connection fails because meteor tries to write on "my_db.system.dummy" and db user doesn't have permission to do so, although db user have full read/write access on "my_db". My question is how I can allow the mongo user to be able to write on "my_db.system.dummy" collection. Also I just confirmed that meteor 0.8.2 isn't connecting with mongo either. This is strange because app was working fine till I upgraded to 0.8.3

UPDATE 2 I use meteor-up for deployment, but for testing locally, this is how I connect (not I get same error in mup logs:

sudo MONGO_URL="mongodb://<db_user>:<password>@<database_url>:27017/<db_name>" mrt --port 80

And this is the error I get:

/Users/charanjitsingh/.meteor/tools/cef2bcd356/lib/node_modules/fibers/future.js:206
W20140808-09:35:09.241(5.5)? (STDERR)                       throw(ex);
W20140808-09:35:09.241(5.5)? (STDERR)                             ^
W20140808-09:35:09.260(5.5)? (STDERR) MongoError: not authorized for query on celebvidy.system.dummy
W20140808-09:35:09.260(5.5)? (STDERR)     at Object.Future.wait (/Users/charnjitsingh/.meteor/tools/cef2bcd356/lib/node_modules/fibers/future.js:326:15)

来源:https://stackoverflow.com/questions/25357914/how-to-allow-write-access-on-system-collection-of-a-database-in-mongo

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!