Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-4614

mongorestore ignores perrmissions and acts like it worked

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.1.0
    • Affects Version/s: 2.0.1
    • Component/s: Security, Tools
    • Labels:
      None
    • Environment:
      Ubuntu (server) OS X (where I ran mongorestore)
    • ALL

      I ran this:

      mongorestore --password MYPASSWORD --username aharbick --host productionhost:27017 --db locos_production --drop /Users/aharbick/databasedump.bson
      connected to: productionhost:27017
      Wed Jan 4 10:48:53 /Users/aharbick/databasedump.bson
      Wed Jan 4 10:48:53 going into namespace [locos_production.collection]
      Wed Jan 4 10:48:53 dropping
      2145 objects found

      HOWEVER aharbick is a readonly account:

      aharbick.local:~/Projects/locos$ mongo productionhost/locos_production --username aharbick --password MYPASSWORD
      MongoDB shell version: 2.0.1
      connecting to: productionhost/locos_production
      > db.collection.count()
      2150
      > db.collection.save(

      {a: 1, b:2}

      )
      unauthorized

      Furthermore, the mongrestore while appearing to have dropped my data and restored 2145 objects it didn't ACTUALLY do that.

            Assignee:
            benjamin.becker Ben Becker
            Reporter:
            aharbick Andrew Harbick
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: