title: Can't launch mongodb
body: <p>I don't know where I went wrong, 
  but there is an error after error going on here, first it was</p>
  
  <pre><code>STORAGE  [initandlisten] exception in initAndListen: 20 Attempted to create a lock file on a read-only directory: /var/lib/mongodb, terminating
  </code></pre>
  
  <p>I fixed with addition of permissions with this command:</p>
  
  <pre><code>sudo chmod -R go+w /var/lib/mongodb
  </code></pre>
  
  <p>, then</p>
  
  <pre><code>couldn't open /var/lib/mongodb/local.0 Operation not permitted
  </code></pre>
  
  <p>fixed it with another sort of permissions(</p>
  
  <pre><code>sudo chown -R $USER /var/lib/mongodb
  </code></pre>
  
  <p>)</p>
  
  <p>now its complaining about:</p>
  
  <pre><code>F JOURNAL  [initandlisten] dbexception during recovery: 13544 recover error couldn't open /var/lib/mongodb/journal/j._0
  2017-11-20T13:19:16.443+0200 I STORAGE  [initandlisten] exception in initAndListen: 13544 recover error couldn't open /var/lib/mongodb/journal/j._0, terminating
  </code></pre>
  
  <p>Update: 
  Fixed that as well with </p>
  
  <pre><code>sudo chown -R mongodb:mongodb /var/lib/mongodb
  </code></pre>
  
  <p>now its</p>
  
  <pre><code>exception in initAndListen: 13440 bad offset:0 accessing file: /var/lib/mongodb/local.0. See http://dochub.mongodb.org/core/data-recovery, terminating
  </code></pre>
  
  <p>what is happening? I mean my Ubuntu is not some super secured version,
  I wish there was some</p>
  
  <pre><code>mongod --repair
  </code></pre>
  
  <p>command for me to use, but there isn't, whenever I try to do it it complains about </p>
  
  <pre><code>exception in initAndListen: 29 Data directory /data/db not found., terminating
  </code></pre>
  
  <p>although in the etc/mongod.config the specified path is /var/lib/mongodb (that's where I was giving all this permissions at)
  Edit:
  fixed that with the CMD "do sudo mkdir /data", the repair run its course successfully, but it didn't help me.</p>
  
  <p>so what do I do? how to fix it?
   how to run the Mongodb? </p>
  
  <p>additional info: I ran it using </p>
  
  <pre><code>sudo service mongod start
  </code></pre>