Database permissions broken?


I was studying for this course last saturday and everything was fine. Nevertheless, I’ve been having troubles to call any function since yesterday (sunday).

As stated in the introductory chapter I’m connecting to the databes by explicitly stating all the servers shards:

mongo "mongodb://,," --authenticationDatabase admin --ssl -u m121 -p aggregations --norc

which initially worked. Now I can correctly connect to the cluster, I can call show dbs/collections, use collection but nothing else.
This is an example:

MongoDB Enterprise Cluster0-shard-0:PRIMARY> db.movies.findOne()
uncaught exception: Error: error: {
	"operationTime" : Timestamp(1601298150, 26),
	"ok" : 0,
	"errmsg" : "not authorized on video to execute command { find: \"movies\", filter: {}, limit: 1.0, singleBatch: true, lsid: { id: UUID(\"cec347cd-f5b5-4dde-a8dc-5d1458ead93f\") }, $clusterTime: { clusterTime: Timestamp(1601296725, 1), signature: { hash: BinData(0, E5DEAF18BAB17234929308FCD0713FB18F35D84B), keyId: 6829321948548300802 } }, $db: \"video\" }",
	"code" : 13,
	"codeName" : "Unauthorized",
	"$clusterTime" : {
		"clusterTime" : Timestamp(1601298150, 26),
		"signature" : {
			"hash" : BinData(0,"JrVmxn9+wru7YdAd6wQPJ3w3ITo="),
			"keyId" : NumberLong("6829321948548300802")
} :

Any idea about the reason?

Most likely you switched to a different databases. Please post screenshot of the command


1 Like

Oh yes, damn. I thought that I had to switch to video that also contained movies collection (in M001 I had to do so as far as I remember). My bad.

1 Like