title: Mongodb restore problems
body: <p>Mongodb, running on an Ubuntu 12.04 box, decided to dump core because it opened too many files (applause).  After running <code>mongod --repair</code> as root as <a href="http://docs.mongodb.org/manual/tutorial/recover-data-following-unexpected-shutdown/" rel="noreferrer">http://docs.mongodb.org/manual/tutorial/recover-data-following-unexpected-shutdown/</a> alluded to (but didn't specify), I now find that mongo has apparently whacked out its own file permissions somehow - every time I try to start I get</p>
  
  <pre><code>Mon Apr  1 15:10:08 [initandlisten] options: { bind_ip: "127.0.0.1", config: "/etc/mongodb.conf", dbpath: "/var/lib/mongodb", logappend: "true", logpath: "/var/log/mongodb/mongodb.log", nojournal: "true" }
  Mon Apr  1 15:10:09 [initandlisten] couldn't open /var/lib/mongod/cerebro_test_import_ayp_part2.ns errno:1 Operation not permitted
  Mon Apr  1 15:10:09 [initandlisten] error couldn't open file /var/lib/mongodb/cerebro_test_import_ayp_part2.ns terminating
  </code></pre>
  
  <p>"Operation not permitted"?  Really?  Even after</p>
  
  <pre><code>$ sudo chmod -R 777 /var/lib/mongodb
  </code></pre>
  
  <p>?  I'm a couple of millimeters away from just blowing this whole database away and chalking it up as yet another reason Mongo sucks.  What can I do to get mongo happy again so I don't have to do that?  What haven't I tried?  What gives?</p>