502 Bad Gateway After Updating Ghost

April 29, 2016 1.2k views
Ghost Nginx

I've been attempting to upgrade my Ghost blog to the most recent version, and in doing so I think I've borked my sudo permissions (or at least that's the problem as far as I can tell...).

  • When I try to access the Ghost blog, I get a 502 Bad Gateway error
  • as far as I can tell Ghost is running and has been updated fine
  • I've stopped and restarted nginx and ghost
  • It's highly possible that I did some functions in the wrong order, but broadly i followed the steps outlined here http://brettdewoody.com/updating-ghost-on-digital-ocean-ubuntu/
  • it was working fine before I tried to upgrade it, and I haven't changed anything in the config.js file
  • when I try and restart the ghost or npm service using the sudo command I get this error sudo: error in /etc/sudo.conf, line 0 while loading plugin `sudoers_policy' sudo: /usr/lib/sudo/sudoers.so must be owned by uid 0 sudo: fatal error, unable to load plugins (my guess is that this is where the issue is?)

Any thoughts on why it might not be working?

Many thanks

(and yes, I've seen the *many *other q's on here with the same issue, but, of those that are answered, none of the solutions work for me)

1 comment
  • Hi,

    What are the permissions and ownership on the file /usr/lib/sudo/sudoers.so ?
    It looks like you may need to chmod that file to be owned by root

Be the first one to answer this question.