Closed AbdealiLoKo closed 2 months ago
I'm confused - how do you expect nvm to operate if it doesn't have full control of everything in $NVM_DIR
?
I was expecting all files in /opt/nvm
to be read+write by my group.
But nvm is creating my group permissions as r-x
instead of rwx
I am using umask 0000
so that all files should be created with rwx rwx rwx
And nvm.sh
is creating it right - i.e. /opt/nvm
is rwx rwx rwx
But nvm install v16.18.1
is created files with rwx r-x r-x
... I wanted it to be more permissive
My usecase is:
Dockerfile
I am installing nvm and nodejs with rootuser
npm install -g PACKAGE
- which failsIt fails because user
does not have access to the nvm folder as it is owned by root.
So, I was trying to make it read+write by everyone in the docker using umask 0000
nvm is per-user - if you want to use it with user
, it must be installed with user
.
Hm, I see - so I guess that's just a limitation I'll have to deal with.
Currently - I need to dynamically change my UserID and GroupID when I run my docker (to avoid permission issue swith my mounted volumes) So, I cannot pre-install nvm in the docker image if my UserID and GroupID are dynamic
Currently doing a chown -R /opt/nvm
seems to work - but it takes an additional 3-5mins to startup my container if I add that (which again makes things very slow)
Having multi user (atleast within the same group) who could use nvm would be a super useful feature in my case. Hoping it can be implemented in the future.
For now, looks like I will need to use something like nodesources or something Thanks for helping me understand the root cause
Duplicate of #
@ @kingwill3
Operating system and version:
Centos 7
nvm debug
output:nvm ls
output:How did you install
nvm
?script
What steps did you perform?
What happened?
nvm got installed, node also got installed successfully. But the permissions were not what I expected
What did you expect to happen?
I was expecting all files to be created with the umask 0000 (i.e. files should have permission
rwx rwx rwx
) - but thenvm install
command does not seem to respect it (and the files haverwx r-x r-x
) i.e. I was expecting my group to be able to write to all folders in/opt/nvm
Is there anything in any of your profile files that modifies the
PATH
?no