title: Unable to save file: Permission denied Ubuntu
body: <p>With the help of a YouTube tutorial, I am working on my first MEAN stack project. So far, I have created <code>index.html</code>, <code>server.js</code> and <code>package.json</code> files. When I installed Mongoose and Body-Parser using terminal, my <code>package.json</code> file stored in Documents showed updated dependencies for <code>package.json</code> like </p>
  
  <pre><code>{
  "name": "njnjn",
  "version": "0.0.1",
  "dependencies": {
      "body-parser": "^1.15.2",
      "express": "^4.14.0",
      "mongoose": "^4.7.5"
    }
  }
  </code></pre>
  
  <p>but I did not see updated dependencies on Atom which had something like </p>
  
  <pre><code>{
  "name": "njnjn",
  "version": "0.0.1",
  "dependencies": {
      "express": "^4.14.0"
    }
  }
  </code></pre>
  
  <p>So, I could not see the updated dependencies for Mongoose and body-parser on the <code>package.json</code>. I'm working on in Atom but I could see the updated dependencies for mongoose and body-parser on package.json in Documents.</p>
  
  <p>I want the dependencies to be updated on both files: the one in Documents and the one I'm editing in Atom (I thought those files were supposed to be the same)</p>
  
  <p>Also, when I tried saving my package.json on Atom(one without updated dependencies for Mongoose and body-parser), an error message popped up saying "Unable to save file: Permission denied." I don't think this error is associated with Atom only because I could not save my package.json file on Sublime as well.</p>
  
  <p>How do I solve this problem so that dependencies for mongoose and body-parser will be updated on the package.json file in my text editor. And how can I save my package.json file on my text editor? </p>
  
  <p>I tried searching everywhere for solution and saw a similar problem on Stack overflow for which the best solution told "to temporarily become root and edit the file:</p>
  
  <p><code>sudo atom /path/to/file"</code></p>
  
  <p>Because I'm new to Ubuntu, programming and command line, I did not understand the solution. Could you guys please help me?</p>