Created
October 19, 2017 01:08
-
-
Save cookie-ag/f13bcf74f0e25c59aed54b00a18de6fc to your computer and use it in GitHub Desktop.
Fixing: sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Problem: sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set | |
- Cause of this: sudo chown -R $(whoami) /usr/{lib/node_modules,bin,share}. | |
- Explaination of the root cause: | |
- "chown -R": change file owner and group information. Use the chmod command to change file access permissions such as read, write, and access. | |
- "$(whoami)" : Throws the present user | |
- "/usr": Only the folders {node_modules,bin,share} will have user rights as tp | |
- The "/usr" directory should have "root" as user. | |
Solution: The Chown cannot be reverted, so re-install is the safest way. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment