What steps did you perform?
sudo -i
nvm install <version>
ls -ln $NVM_DIR/versions/node/<version>
What happened?
The files for the installed version are owned by the user from the tarball (ie. uid 2000)
What did you expect to happen?
The files for the installed version should be owned by root
Suggestions
Add --no-same-owner to the tar extraction arguments arguments to disable --preserve-permissions which is enabled when tar is executed as root.
What steps did you perform?
What happened?
The files for the installed version are owned by the user from the tarball (ie. uid 2000)
What did you expect to happen?
The files for the installed version should be owned by root
Suggestions
Add
--no-same-ownerto the tar extraction arguments arguments to disable--preserve-permissionswhich is enabled when tar is executed as root.