Score:0

sudo npm cache clean -f messed up sudo permissions

ne flag

sudo was initially working when running sudo npm cache clean -f, but sudo broke after the npm command finished running.

$ sudo npm cache clean -f
$ sudo ls
sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set
$ ll /usr/bin/sudo
-rwxr-xr-x 1 gameveloster root 232416 Aug  4 06:35 /usr/bin/sudo*

Tried to chown the owner back to root, but same error

$ sudo chown root:root /usr/bin/sudo
sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set
$ npm --version
8.19.2
$ node --version
v16.18.0

Why did this happen, and what should I do to fix this? I cant seem to use sudo anymore!

Thank you for any help

David avatar
cn flag
You do anything with python, like change the version?
gameveloster avatar
ne flag
@David Nope, did not do anything related to Python
Zanna avatar
kr flag
I would guess that this happened before the command you mentioned? The setuid bit is missing, but afaik you will not be able to set it without `sudo`, unless you have enabled a root password
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.