运维系列:sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set

sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set




sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set

这个错误提示表明 /usr/bin/sudo 的所有者不是 UID 0(超级用户)或者缺少设置了 setuid 位的权限

通常情况下,正确的 sudo 权限设置是:

-rwsr-xr-x 1 root root

如果你遇到了上述错误,请确保 /usr/bin/sudo 文件的所有者为 root,并且具有正确的权限。可以通过以下命令进行修复:

sudo chown root:root /usr/bin/sudo
sudo
posted @ 2024-09-04 11:42  坦笑&&life  阅读(95)  评论(0编辑  收藏  举报  来源