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

Different users in same unix group can't run mongod against single db owned by that group

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Critical - P2 Critical - P2
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • ALL

      I'd like to let different users (call them jack & jane) launch mongod using the same dbpath (call it /datadir). Here's what I try:
      1) chown all the files in /datadir to jack:mongogroup
      2) chmod -R g+rw /datadir
      3) useradd jack and jane to mongogroup.

      When I launch mongod --dbpath=/datadir as jack, things are fine. But when I try to relaunch mongod as jane, I get errors like this:
      Wed Nov 7 00:30:43 [initandlisten] warning couldn't write to / rename file /datadir/journal/prealloc.0: couldn't open file /datadir/journal/prealloc.0 for writing errno:1 Operation not permitted
      Wed Nov 7 00:30:43 [initandlisten] couldn't open /datadir/sample.ns errno:1 Operation not permitted

      This doesn't seem to be (simply) a permissions issue. If I make a mistake on permissions, I get "errno:13 Permission denied", instead of "errno:1 Operation not permitted". Also, jane can read/write test files in that directory as expected (aside from launching mongod).

            Assignee:
            akshay@mongodb.com Akshay Kumar
            Reporter:
            bobbyj Bobby J
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: