[SERVER-12067] copydb command fails with 2.6 authorization with local source Created: 12/Dec/13  Updated: 11/Jul/16  Resolved: 07/Jan/14

Status: Closed
Project: Core Server
Component/s: Security
Affects Version/s: 2.5.4
Fix Version/s: 2.5.5

Type: Task Priority: Major - P3
Reporter: Kay Kim (Inactive) Assignee: Spencer Brody (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Participants:

 Description   

If copydb is used to copy from one database to another on the same machine and access control is enabled, it will fail every time with the error:

 
db.getSiblingDB("admin").runCommand( { copydb: 1, fromdb: "mySourceDB", todb: "myTargetDB" } )
{
	"ok" : 0,
	"errmsg" : "index query on ns mySourceDB.system.namespaces failed: not authorized for query on mySourceDB.system.namespaces"
}



 Comments   
Comment by Githook User [ 07/Jan/14 ]

Author:

{u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@10gen.com'}

Message: SERVER-12067 Make copydb command work with auth enabled when source is local
Branch: master
https://github.com/mongodb/mongo/commit/3be94e6c074a53a0a203561b57540ff4f2cdc689

Comment by Spencer Brody (Inactive) [ 03/Jan/14 ]

Can you attach the full list of privileges the user has? You can get it by running db.runCommand(

{usersInfo: '<username>', showPrivileges:true}

);

Generated at Thu Feb 08 03:27:30 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.