P
P
php_raper2021-06-04 15:22:14
linux
php_raper, 2021-06-04 15:22:14

Problem with node js Permission denied, how to solve?

After npm audit fix no access to nodejs
write command in terminal node -v
-bash: /usr/bin/node: Permission denied
npm -v
-bash: /usr/bin/node: Permission denied
do chmod on /usr/bin/ node
chmod: changing permissions of '/usr/bin/node': Operation not permitted
I run all commands as root.

Trying to reinstall node
dpkg: Warning: Deleting nodejs package failed to remove directory '/usr/bin/node': Operation not permitted - perhaps it is a filesystem mount point?
What could be? How to resolve the issue.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Yuriev, 2021-06-04
@php_raper

chattr -i /usr/bin/node
chmod 755 /usr/bin/node

with root rights of course

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question