1

Running /usr/bin/env sudo /etc/init.d/httpd restart on a godaddy vps works fine from the shell. The same command executed remotely via capistrano generates the following error:

sudo: effective uid is not 0, is sudo installed setuid root?

File permissions on sudo executable are:

File: ‘/usr/bin/sudo’ Size: 155008 Blocks: 304 IO Block: 4096 regular file Device: fc00h/64512d Inode: 914213
Links: 1 Access: (4755/-rwsr-xr-x) Uid: ( 0/ root) Gid: (
0/ root)

Is there a way to troubleshoot this?

  • Is the problem specific to this command? Can you run other stuff through Capistrano? – Paul Haldane Feb 16 '15 at 7:42
  • @Paul Haldane All other commands run fine, just the sudo commands. I ran with --trace ... went through the logs searching for a clue I am at a loss to debug this. – stefgosselin Feb 16 '15 at 12:43
  • The command works when executed as deploy user on remote server ... seems to only fail from remote shell. – stefgosselin Feb 16 '15 at 12:44
  • @stefgosselin - did you ever get this resolved? I'm the same error when trying to sudo through another program. Same command works fine from shell. – BillMan Apr 30 '15 at 15:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.