Skip to content

nvm install preserves tarball UID/GID when run as root (missing --no-same-owner) #3828

@meeuw

Description

@meeuw

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    pull request wantedThis is a great way to contribute! Help us out :-D

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions