Report this

What is the reason for this report?

No permissions to update database in Digitalocean managed DB

Posted on October 12, 2021
dest

By dest

I deployed a dump of my mongodb to a mongod which is controlled by Digital Ocean, and after connecting to the database, I do not have permission to update some databases, I get Error: not authorized on <ab> to execute command, I have the following rights:

{
"role": "backup",
"db": "admin"
},
{
"role": "clusterMonitor",
"db": "admin"
},
{
"role": "dbAdminAnyDatabase",
"db": "admin"
},
{
"role": "readWriteAnyDatabase",
"db": "admin"
},
{
"role": "restore",
"db": "admin"
}

but if I try to extend them with mongodb, nothing happens, they remain the same, what am I doing wrong?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

it seems my database has the name config, and it is the same as the system name, as I understand it …

Hi @dest,

Can you confirm if you are using “doadmin” user to update the user database and getting “Error: not authorized” error?

If not I will suggest using “doadmin” user to update user databases.

For More information on MongoDB managed database users and databases :

https://docs.digitalocean.com/products/databases/mongodb/how-to/manage-users-and-databases/

And for Importing database to MongoDB managed database, you can check the below article :

https://docs.digitalocean.com/products/databases/mongodb/how-to/import-collections/

If you are still seeing not authorize error using “doadmin” user, you can open a support ticket with DigitalOcean.

https://docs.digitalocean.com/support/

Regards, Rajkishore

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.