[SERVER-7025] read only in 2.2 Created: 12/Sep/12 Updated: 15/Feb/13 Resolved: 13/Sep/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Question | Priority: | Minor - P4 |
| Reporter: | George Nikopoulos | Assignee: | Spencer Brody (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Windows 32 |
||
| Participants: |
| Description |
|
I tried testing the read only user on the new mongodb version and I can not not get read-only to work. I did this test on my PC, and not in our real production environment.Here is my test. Firt I started mongo, and create an admin user "george". Then I restarted mongod with the --auth option. > db.ll.save( {fname:"Two"}) > exit It should not let me save the "Two" right? Thanks |
| Comments |
| Comment by George Nikopoulos [ 12/Sep/12 ] |
|
Got it. I guess the subsequent db.auths inherit the first db.auths. I tried your suggestion and it works. Thanks. |
| Comment by Spencer Brody (Inactive) [ 12/Sep/12 ] |
|
In the test above you are still authenticated as the admin user when you create the "Two" document. You will need to logout() of the admin DB first to be denied write access. |