[SERVER-24288] How to pass credentials in Gridfs object Created: 25/May/16  Updated: 27/May/16  Resolved: 27/May/16

Status: Closed
Project: Core Server
Component/s: GridFS
Affects Version/s: 3.2.6
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: Aslam Shaikh Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

Hi,

I am not able get file from mongodb using gridfs with authentication.
If i am working without --auth (authentication it will working fine)
but if i am apply authentication on database with --auth and run server
i didn't get file from database and got error like below.

Command find failed: not authorized on DBName to execute command

{ find: "fs.files", filter: { _id: ObjectId('572a0283fb7f1d15e82f3b8a') }, sort: { uploadDate: -1 }, skip: 0, limit: 1, noCursorTimeout: false }

Notice : this issue occurred only on authentication for find document of file.
i was store image file in db its saved successfully but at the time of retrieve that image file error will occurred.

Thanks you.



 Comments   
Comment by Ramon Fernandez Marina [ 27/May/16 ]

Thanks for your report shaikh.a@droisys.com. Please note that the SERVER project is for reporting bugs or feature suggestions for the MongoDB server. For MongoDB-related support discussion please post on the mongodb-user group or Stack Overflow with the mongodb tag, where your question will reach a larger audience. A question like this involving more discussion would be best posted on the mongodb-user group. See also our Technical Support page for additional support resources.

Regards,
Ramón.

Generated at Thu Feb 08 04:05:55 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.