title: MongoDB only works when run as root on Ubuntu - data directory issue
body: <p>I installed MongoDB with the <a href="http://www.mongodb.org/display/DOCS/Ubuntu+and+Debian+packages">official packages</a> (mongodb-stable), and followed the <a href="http://www.mongodb.org/display/DOCS/Quickstart+Unix">Quickstart guide</a> which includes:</p>
  
  <blockquote>
    <p>By default MongoDB will store data in
    <code>/data/db</code>, but it won't automatically
    create that directory. To create it,
    do:</p>
  
  <pre><code>$ sudo mkdir -p /data/db/
  $ sudo chown `id -u` /data/db
  </code></pre>
    
    <p>You can also tell MongoDB to use a
    different data directory, with the
    <code>--dbpath</code> option.</p>
  </blockquote>
  
  <p>MongoDB will only start if I run <code>sudo mongod</code> - if I try and run just <code>mongod</code> I get the error:</p>
  
  <pre><code>Mon Mar 14 15:27:07 [initandlisten] couldn't open /data/db/test.ns errno:13 Permission denied
  Mon Mar 14 15:27:07 [initandlisten]   couldn't open file /data/db/test.ns terminating
  Mon Mar 14 15:27:07 dbexit:
  </code></pre>
  
  <p>What gives?</p>