{"id":5444,"date":"2018-07-31T17:03:15","date_gmt":"2018-07-31T17:03:15","guid":{"rendered":"https:\/\/www.truehost.co.ke\/support\/?post_type=ht_kb&#038;p=5444"},"modified":"2024-06-07T13:03:36","modified_gmt":"2024-06-07T13:03:36","password":"","slug":"diagnose-sudo-must-setuid-root-sudo-effective-uid-not-0-sudo-installed-setuid-root-error","status":"publish","type":"docs","link":"https:\/\/truehost.com\/support\/knowledge-base\/diagnose-sudo-must-setuid-root-sudo-effective-uid-not-0-sudo-installed-setuid-root-error\/","title":{"rendered":"How to diagnose \u201csudo: must be setuid root\u201d or \u201csudo: effective uid is not 0, is sudo installed setuid root?\u201d error?"},"content":{"rendered":"<p>Environment setup:<\/p>\n<ul>\n<li>Centos 7 | WHM\/Cpanel installed | A user who can access Shell and is in the wheel group (sudoer)<\/li>\n<\/ul>\n<p>This error occurs when trying to use a sudoer user. Users who are in the \/etc\/sudoers file should be able to run root commands by prefacing sudo to such commands. Here, however, when you supply the sudo command for such a user, the error is shown.<\/p>\n<p>To resolve it, do the following:<\/p>\n<p>1. Run the following commands to check the permissions and ownership of \/usr\/bin\/sudo file. The expected output of the commands is also displayed below.<\/p>\n<p><code class=\"western\">a)<\/code><code class=\"western\">ls<br \/>\n-l \/usr\/bin\/sudo<\/code><\/p>\n<p><code class=\"western\">---s--x--x<br \/>\n1 root root 143184 Apr 11 07:30 \/usr\/bin\/sudo<\/code><\/p>\n<p><code class=\"western\">b)stat<br \/>\n\/usr\/bin\/sudo<\/code><\/p>\n<p><code class=\"western\">-----------------------------------<\/code><\/p>\n<p><code class=\"western\">Access:<br \/>\n(4111\/---s--x--x)  Uid: (0\/    root)   Gid:(0\/    root)<\/code><\/p>\n<p><code class=\"western\">-----------------------------------<\/code><\/p>\n<p>2. If the output is not as displayed above, run the following commands to set the right permissions and ownerships.<\/p>\n<p><span style=\"font-family: Liberation Mono, monospace;\">[root@serv1]# chown root:root \/usr\/bin<\/span><\/p>\n<p><span style=\"font-family: Liberation Mono, monospace;\">[root@serv1]# chmod u+s \/usr\/bin\/sudo<\/span><\/p>\n<p>3. Lastly, login to <b>WHM&gt;&gt;Account Functions&gt;&gt; Manage Shell Access<\/b>. Set the particular account to <b>Normal Shell<\/b> instead<b> Jail Shell<\/b> as Jail Shell has some restrictions.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Environment setup: Centos 7 | WHM\/Cpanel installed | A user who can access Shell and is in the wheel group (sudoer) This error occurs when trying to use a sudoer user. Users who are in the \/etc\/sudoers file should be able to run root commands by prefacing sudo to such commands. Here, however, when you [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_eb_attr":"","_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"doc_category":[],"doc_tag":[],"class_list":["post-5444","docs","type-docs","status-publish","hentry"],"year_month":"2026-06","word_count":186,"total_views":0,"reactions":{"happy":0,"normal":0,"sad":0},"author_info":{"name":"w m","author_nicename":"wm","author_url":"https:\/\/truehost.com\/support\/author\/wm\/"},"doc_category_info":[],"doc_tag_info":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to diagnose \u201csudo: must be setuid root\u201d or \u201csudo: effective uid is not 0, is sudo installed setuid root?\u201d error? -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/truehost.com\/support\/knowledge-base\/diagnose-sudo-must-setuid-root-sudo-effective-uid-not-0-sudo-installed-setuid-root-error\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to diagnose \u201csudo: must be setuid root\u201d or \u201csudo: effective uid is not 0, is sudo installed setuid root?\u201d error? -\" \/>\n<meta property=\"og:description\" content=\"Environment setup: Centos 7 | WHM\/Cpanel installed | A user who can access Shell and is in the wheel group (sudoer) This error occurs when trying to use a sudoer user. Users who are in the \/etc\/sudoers file should be able to run root commands by prefacing sudo to such commands. Here, however, when you [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/truehost.com\/support\/knowledge-base\/diagnose-sudo-must-setuid-root-sudo-effective-uid-not-0-sudo-installed-setuid-root-error\/\" \/>\n<meta property=\"article:modified_time\" content=\"2024-06-07T13:03:36+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/diagnose-sudo-must-setuid-root-sudo-effective-uid-not-0-sudo-installed-setuid-root-error\\\/\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/diagnose-sudo-must-setuid-root-sudo-effective-uid-not-0-sudo-installed-setuid-root-error\\\/\",\"name\":\"How to diagnose \u201csudo: must be setuid root\u201d or \u201csudo: effective uid is not 0, is sudo installed setuid root?\u201d error? -\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/#website\"},\"datePublished\":\"2018-07-31T17:03:15+00:00\",\"dateModified\":\"2024-06-07T13:03:36+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/diagnose-sudo-must-setuid-root-sudo-effective-uid-not-0-sudo-installed-setuid-root-error\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/diagnose-sudo-must-setuid-root-sudo-effective-uid-not-0-sudo-installed-setuid-root-error\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/diagnose-sudo-must-setuid-root-sudo-effective-uid-not-0-sudo-installed-setuid-root-error\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to diagnose \u201csudo: must be setuid root\u201d or \u201csudo: effective uid is not 0, is sudo installed setuid root?\u201d error?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/#website\",\"url\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/\",\"name\":\"\",\"description\":\"Help In a Click\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/#organization\",\"name\":\"Truehost Kenya\",\"url\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/cropped-image_2026-04-16_174808866.png\",\"contentUrl\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/cropped-image_2026-04-16_174808866.png\",\"width\":240,\"height\":48,\"caption\":\"Truehost Kenya\"},\"image\":{\"@id\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to diagnose \u201csudo: must be setuid root\u201d or \u201csudo: effective uid is not 0, is sudo installed setuid root?\u201d error? -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/truehost.com\/support\/knowledge-base\/diagnose-sudo-must-setuid-root-sudo-effective-uid-not-0-sudo-installed-setuid-root-error\/","og_locale":"en_US","og_type":"article","og_title":"How to diagnose \u201csudo: must be setuid root\u201d or \u201csudo: effective uid is not 0, is sudo installed setuid root?\u201d error? -","og_description":"Environment setup: Centos 7 | WHM\/Cpanel installed | A user who can access Shell and is in the wheel group (sudoer) This error occurs when trying to use a sudoer user. Users who are in the \/etc\/sudoers file should be able to run root commands by prefacing sudo to such commands. Here, however, when you [&hellip;]","og_url":"https:\/\/truehost.com\/support\/knowledge-base\/diagnose-sudo-must-setuid-root-sudo-effective-uid-not-0-sudo-installed-setuid-root-error\/","article_modified_time":"2024-06-07T13:03:36+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/truehost.com\/support\/knowledge-base\/diagnose-sudo-must-setuid-root-sudo-effective-uid-not-0-sudo-installed-setuid-root-error\/","url":"https:\/\/truehost.com\/support\/knowledge-base\/diagnose-sudo-must-setuid-root-sudo-effective-uid-not-0-sudo-installed-setuid-root-error\/","name":"How to diagnose \u201csudo: must be setuid root\u201d or \u201csudo: effective uid is not 0, is sudo installed setuid root?\u201d error? -","isPartOf":{"@id":"https:\/\/www.truehost.com\/support\/#website"},"datePublished":"2018-07-31T17:03:15+00:00","dateModified":"2024-06-07T13:03:36+00:00","breadcrumb":{"@id":"https:\/\/truehost.com\/support\/knowledge-base\/diagnose-sudo-must-setuid-root-sudo-effective-uid-not-0-sudo-installed-setuid-root-error\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/truehost.com\/support\/knowledge-base\/diagnose-sudo-must-setuid-root-sudo-effective-uid-not-0-sudo-installed-setuid-root-error\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/truehost.com\/support\/knowledge-base\/diagnose-sudo-must-setuid-root-sudo-effective-uid-not-0-sudo-installed-setuid-root-error\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.truehost.com\/support\/"},{"@type":"ListItem","position":2,"name":"How to diagnose \u201csudo: must be setuid root\u201d or \u201csudo: effective uid is not 0, is sudo installed setuid root?\u201d error?"}]},{"@type":"WebSite","@id":"https:\/\/www.truehost.com\/support\/#website","url":"https:\/\/www.truehost.com\/support\/","name":"","description":"Help In a Click","publisher":{"@id":"https:\/\/www.truehost.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.truehost.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.truehost.com\/support\/#organization","name":"Truehost Kenya","url":"https:\/\/www.truehost.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.truehost.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2026\/04\/cropped-image_2026-04-16_174808866.png","contentUrl":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2026\/04\/cropped-image_2026-04-16_174808866.png","width":240,"height":48,"caption":"Truehost Kenya"},"image":{"@id":"https:\/\/www.truehost.com\/support\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs\/5444","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/comments?post=5444"}],"version-history":[{"count":1,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs\/5444\/revisions"}],"predecessor-version":[{"id":5445,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs\/5444\/revisions\/5445"}],"wp:attachment":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/media?parent=5444"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/doc_category?post=5444"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/doc_tag?post=5444"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}