User is not allowed to do action [createIndex] on

Hi all,
I have worked on a project with meteorJS these days. I tried to deploy a new version and connect it to mongoDB as usual. However, it failed. And I got this error:

MongoError: user is not allowed to do action [createIndex] on…

I wonder if I make any mistakes…And I hope that I can figure out the problems :frowning:
Thanks for your reading!

Hi @Yu_Chieh_Chen ,

It seems the user you logged in with do not have the createIndex privilege. make sure the user has readWrite roles assigned in order to create the index.

thanks,
Darshan

4 Likes

Hi @Darshan_j ,
Thank you for your advice!
I have checked the privilege of the roles before. It has always been the readWrite, so that’s why I was so confused about this error.
However, this morning I just found that I can deploy the new version successfully! And I still don’t know why because I neither change any steps nor update my code.
Any way, I am appreciate with your reply!

thanks,
Yu-Chieh

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.