title: EACCES Issue on npm fresh install on WSL Debian trying to update to the latest version
body: <p>Hello everyone i started with a fresh wsl distrib of Debian and installed nodejs and npm on it.</p>
  
  <p>When trying to update to the latest release of npm with the following command:</p>
  
  <blockquote>
    <p>sudo npm install npm@latest -g</p>
  </blockquote>
  
  <p>I get some weird issues who seems pretty common on wsl from what i saw on my internet researchs the only answer who seems to works but not really resolving properly the issue is setting the unsafe permissions to true with the following command: </p>
  
  <blockquote>
    <p>npm config set unsafe-perm true</p>
  </blockquote>
  
  <p>I would avoid to use this method and find an more clean way to resolve the issue.</p>
  
  <p>Here is the console output:</p>
  
  <pre><code>####@#####:~$ sudo npm install npm@latest -g
  npm ERR! path /usr/lib/node_modules/.staging/npm-18aca6f9/node_modules/wrap- 
  ansi
  npm ERR! code EACCES
  npm ERR! errno -13
  npm ERR! syscall rename
  npm ERR! Error: EACCES: permission denied, rename 
  '/usr/lib/node_modules/.staging/npm-18aca6f9/node_modules/wrap-ansi' -&gt; 
  '/usr/lib/node_modules/.staging/wrap-ansi-9f8997e7'
  npm ERR!  { [Error: EACCES: permission denied, rename 
  '/usr/lib/node_modules/.staging/npm-18aca6f9/node_modules/wrap-ansi' -&gt; 
  '/usr/lib/node_modules/.staging/wrap-ansi-9f8997e7']
  npm ERR!   cause:
  npm ERR!    { Error: EACCES: permission denied, rename 
  '/usr/lib/node_modules/.staging/npm-18aca6f9/node_modules/wrap-ansi' -&gt; 
  '/usr/lib/node_modules/.staging/wrap-ansi-9f8997e7'
  npm ERR!      errno: -13,
  npm ERR!      code: 'EACCES',
  npm ERR!      syscall: 'rename',
  npm ERR!      path:
  npm ERR!       '/usr/lib/node_modules/.staging/npm- 
  18aca6f9/node_modules/wrap-ansi',
  npm ERR!      dest: '/usr/lib/node_modules/.staging/wrap-ansi-9f8997e7' },
  npm ERR!   stack:
  npm ERR!    "Error: EACCES: permission denied, rename 
  '/usr/lib/node_modules/.staging/npm-18aca6f9/node_modules/wrap-ansi' -&gt; 
  '/usr/lib/node_modules/.staging/wrap-ansi-9f8997e7'",
  npm ERR!   errno: -13,
  npm ERR!   code: 'EACCES',
  npm ERR!   syscall: 'rename',
  npm ERR!   path:
  npm ERR!    '/usr/lib/node_modules/.staging/npm-18aca6f9/node_modules/wrap- 
  ansi',
  npm ERR!   dest: '/usr/lib/node_modules/.staging/wrap-ansi-9f8997e7' }
  npm ERR!
  npm ERR! The operation was rejected by your operating system.
  npm ERR! It is likely you do not have the permissions to access this file as 
  the current user
  npm ERR!
  npm ERR! If you believe this might be a permissions issue, please double- 
  check the
  npm ERR! permissions of the file and its containing directories, or try 
  running
  npm ERR! the command again as root/Administrator (though this is not 
  recommended).
  
  npm ERR! A complete log of this run can be found in:
  npm ERR!     /root/.npm/_logs/2019-03-15T23_53_32_851Z-debug.log
  </code></pre>
  
  <p>I followed the doc of the nodejs website for installation using curl in root mode to get the repository of the last 11.x version of node.</p>
  
  <p>Thanks in advance!</p>