title: NVM: Getting Permission denied with nvm install command
body: <p>I recently fresh-installed Ubuntu 21.04 and wanted to install nvm:</p>
  <p><code>curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash</code></p>
  <p>Then closed and re-opened the terminal. When requesting an install of version <code>12.16.3</code> (have tried with other versions as well). I'm getting the following error:</p>
  <pre><code>nvm install 12.16.3
  Downloading and installing node v12.16.3...
  Downloading https://nodejs.org/dist/v12.16.3/node-v12.16.3-linux-x64.tar.xz...
  Warning: Failed to create the file 
  Warning: /home/sauronnikko/.nvm/.cache/bin/node-v12.16.3-linux-x64/node-v12.16.
  Warning: 3-linux-x64.tar.xz: Permission denied
  curl: (23) Failure writing output to destination
  
  Binary download from https://nodejs.org/dist/v12.16.3/node-v12.16.3-linux-x64.tar.xz failed, trying source.
  grep: /home/sauronnikko/.nvm/.cache/bin/node-v12.16.3-linux-x64/node-v12.16.3-linux-x64.tar.xz: No such file or directory
  Provided file to checksum does not exist.
  Binary download failed, trying source.
  Downloading https://nodejs.org/dist/v12.16.3/node-v12.16.3.tar.xz...
  Warning: Failed to create the file 
  Warning: /home/sauronnikko/.nvm/.cache/src/node-v12.16.3/node-v12.16.3.tar.xz: 
  Warning: Permission denied
  curl: (23) Failure writing output to destination
  
  Binary download from https://nodejs.org/dist/v12.16.3/node-v12.16.3.tar.xz failed, trying source.
  grep: /home/sauronnikko/.nvm/.cache/src/node-v12.16.3/node-v12.16.3.tar.xz: No such file or directory
  Provided file to checksum does not exist.
  </code></pre>