{"id":916,"date":"2018-04-25T17:23:22","date_gmt":"2018-04-25T11:53:22","guid":{"rendered":"https:\/\/www.coimbatorewebhosting.com\/blog\/?p=916"},"modified":"2019-08-21T10:38:13","modified_gmt":"2019-08-21T05:08:13","slug":"how-to-disable-selinux-on-centos","status":"publish","type":"post","link":"https:\/\/coimbatorewebhosting.com\/blog\/how-to-disable-selinux-on-centos\/","title":{"rendered":"How to disable SELinux on CentOS 7\/6"},"content":{"rendered":"<p><strong>Disabling SELinux on CentOS 7\/6<\/strong><\/p>\n<p>SELinux is a set of extra security restrictions on top of the normal Linux security tools. It gives the systems administrator a finer grain of <a  href=\"https:\/\/www.coimbatorewebhosting.com\/blog\/how-to-choose-the-raid-configuration-for-web-server\/\" title=\"control\" alt=\"control\">control<\/a> than what the <a href=\"https:\/\/www.kernel.org\/\" rel=\"nofollow noopener\" target=\"_blank\">kernel<\/a> typically provides.\u00a0 Here is the small guide for disabling SELinux on <a href=\"https:\/\/www.squarebrothers.com\/linux-web-hosting-india\/\" rel=\"nofollow noopener\" target=\"_blank\">CentOS<\/a><\/p>\n<p>Edit the \/etc\/selinux\/config.<\/p>\n<pre>[root@coimbatorewebhosting \/]# nano\u00a0\/etc\/selinux\/config<\/pre>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/coimbatorewebhosting.com\/blog\/how-to-disable-selinux-on-centos\/#Change_from_SELinuxenforcing\" >Change from\u00a0SELinux=enforcing<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/coimbatorewebhosting.com\/blog\/how-to-disable-selinux-on-centos\/#to_SELinuxdisabled\" >to\u00a0SELinux=disabled<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Change_from_SELinuxenforcing\"><\/span>Change from\u00a0<strong>SELinux=enforcing<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<pre># This <a href=\"https:\/\/www.coimbatorewebhosting.com\/blog\/list-of-commands-to-config-vps-through-ssh-putty\/\" title=\"file\" alt=\"file\">file<\/a> controls the state of SELinux on the system.\r\n# SELINUX= can take one of these three values:\r\n# enforcing - SELinux security policy is enforced.\r\n# permissive - SELinux prints warnings instead of enforcing.\r\n# disabled - No SELinux policy is loaded.\r\n<strong>SELINUX=enforcing<\/strong>\r\n# SELINUXTYPE= can take one of these two values:\r\n# targeted - Targeted processes are protected,\r\n# minimum - Modification of targeted policy. Only selected processes are pr$\r\n# mls - Multi Level Security protection.\r\nSELINUXTYPE=targeted<\/pre>\n<h3><span class=\"ez-toc-section\" id=\"to_SELinuxdisabled\"><\/span>to\u00a0<strong>SELinux=disabled<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<pre># This file controls the state of SELinux on the system.\r\n# SELINUX= can take one of these three values:\r\n# enforcing - SELinux security policy is enforced.\r\n# permissive - SELinux prints warnings instead of enforcing.\r\n# disabled - No SELinux policy is loaded.\r\n<strong>SELINUX=disabled<\/strong>\r\n# SELINUXTYPE= can take one of these two values:\r\n# targeted - Targeted processes are protected,\r\n# minimum - Modification of targeted policy. Only selected processes are pr$\r\n# mls - Multi Level Security protection.\r\nSELINUXTYPE=targeted<\/pre>\n<p>This setup will disable SELinux on next reboot.<\/p>\n<p>To disable SELinux without rebooting, use the following command.<\/p>\n<pre>[root@coimbatorewebhosting \/]# setenforce 0<\/pre>\n<p>This command will disable SELinux until you reboot the system.<\/p>\n<p>Now, the SELinux has been disabled.To know how to secure your website using SSL <a href=\"https:\/\/www.coimbatorewebhosting.com\/blog\/how-to-secure-website-with-ssl\/\">click here.<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Disabling SELinux on CentOS 7\/6 SELinux is a set of extra security restrictions on top of the normal Linux security tools. It gives the systems administrator a finer grain of control than what the kernel typically provides.\u00a0 Here is the small guide for disabling SELinux on CentOS Edit the \/etc\/selinux\/config. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":943,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[153,17,3],"tags":[61],"class_list":["post-916","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-centos-7-rhel-7","category-general","category-linux","tag-selinux"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/coimbatorewebhosting.com\/blog\/wp-content\/uploads\/2018\/04\/disable-se-linux-1024x362.png","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pa2YU7-eM","_links":{"self":[{"href":"https:\/\/coimbatorewebhosting.com\/blog\/wp-json\/wp\/v2\/posts\/916","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/coimbatorewebhosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/coimbatorewebhosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/coimbatorewebhosting.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/coimbatorewebhosting.com\/blog\/wp-json\/wp\/v2\/comments?post=916"}],"version-history":[{"count":0,"href":"https:\/\/coimbatorewebhosting.com\/blog\/wp-json\/wp\/v2\/posts\/916\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/coimbatorewebhosting.com\/blog\/wp-json\/wp\/v2\/media\/943"}],"wp:attachment":[{"href":"https:\/\/coimbatorewebhosting.com\/blog\/wp-json\/wp\/v2\/media?parent=916"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/coimbatorewebhosting.com\/blog\/wp-json\/wp\/v2\/categories?post=916"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/coimbatorewebhosting.com\/blog\/wp-json\/wp\/v2\/tags?post=916"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}