How To

How to fix macOS error “/usr/bin/sudo must be owned by uid 0 and have the setuid bit set”

Post by
Host My Apple

Occasionally it is possible when making changes with the “root” account to mess up permissions in macOS for “sudo”


When this occurs if you attempt to use the “sudo” command inside of terminal you may experience the error message:
<code>"/usr/bin/sudo must be owned by uid 0 and have the setuid bit set"</code>

If you have encountered this error it is very likely that you already have access to the root account however if for some reason you do not you can read the followinmg article here:(How To Enable Root in macOS) to learn how to enable the “root” account.


After the root account is enabled…


Log out as the current user, then log back in as root.


Execute <code>chown root:root /usr/bin/sudo && chmod 4755 /usr/bin/sudo</code>


Log out as root, then log back in as the current user.

After this try sudo again and you should be successful.

If you see this issue on macOS feel free to contact us and share your findings on this issue.
Also, if you want to check out the best virtual cloud macOS servers visit www.hostmyapple.com/macvps.html for information

More From Blog

You Might Also Like

How To
How to use iMessage on Android with AirMessage and a HostMyApple Mac Cloud Server
Read More
How To
How to install TeamViewer on Windows and macOS
Read More
How To
How to access your macOS VPS using Remotix
Read More