title: CentOS error - sudo: effective uid is not 0, is sudo installed setuid root?
body: <p>I found another question with the same headline, however, I suppose my case is a bit different. </p>
  
  <p>In an attempt to setup the new project, I needed to install nodejs. I realised that it worked only when used with sudo. For eg. sudo npm </p>
  
  <p>Furthermore, I visited the link <a href="https://docs.npmjs.com/getting-started/fixing-npm-permissions" rel="noreferrer">https://docs.npmjs.com/getting-started/fixing-npm-permissions</a> and performed </p>
  
  <p><code>sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}</code></p>
  
  <p>to change default directory permissions.
  Now because I had to sudo npm here as well, I ran </p>
  
  <p><code>sudo chown -R $(whoami) $(sudo npm config get prefix)/{lib/node_modules,bin,share}</code> </p>
  
  <p>Post this, whenever I try to use sudo, I get this error -</p>
  
  <pre><code>sudo: effective uid is not 0, is sudo installed setuid root?
  </code></pre>
  
  <p>I understand that my setup for npm should have been better and off root, but I am a Linux novice. </p>
  
  <p>Any help would be appreciated. :) </p>
  
  <p><strong>More information -</strong></p>
  
  <p><code>ls -l $(which sudo)</code> gives =>  <code>---s--x--x. 1 dev root 123832 Aug 13 2015 /usr/bin/sudo</code></p>