{"id":68,"date":"2021-09-17T13:26:03","date_gmt":"2021-09-17T13:26:03","guid":{"rendered":"http:\/\/host2day.in\/blog\/?p=68"},"modified":"2021-10-28T06:58:53","modified_gmt":"2021-10-28T06:58:53","slug":"enable-selinux-in-centos-7","status":"publish","type":"post","link":"https:\/\/host2day.in\/blog\/enable-selinux-in-centos-7\/","title":{"rendered":"How to? Enable SELinux in CentOS 7"},"content":{"rendered":"\n<p>SELinux is a security feature available in Linux kernel and by default it is set to disabled.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">SELinux feature has 3 modes:<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>enforcing mode<\/li><li>passive mode<\/li><li>disabled mode<\/li><\/ul>\n\n\n\n<p>To check the current mode type-in the following command<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>estatus<\/code><\/pre>\n\n\n\n<p>by default it will show as SELinux=disabled<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Steps to enable SELinux<\/h2>\n\n\n\n<p>Change the status of SELinux service in the <strong><em>\/etc\/selinux\/config<\/em><\/strong>&nbsp;file.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vim \/etc\/selinux\/config<\/code><\/pre>\n\n\n\n<p>You can now change the SELinux mode SELinx=disabled to&nbsp;either&nbsp;<strong><em>enforcing<\/em><\/strong>&nbsp;or&nbsp;<strong><em>permissive<\/em><\/strong>.<\/p>\n\n\n\n<p>Now enter :wq to save the edit.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>reboot<\/code><\/pre>\n\n\n\n<p>Check the status of SELinux mode by entering<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sestatus<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>SELinux is a security feature available in Linux kernel and by default it is set to disabled. SELinux feature has 3 modes: enforcing mode passive mode disabled mode To check the current mode type-in the following command by default it will show as SELinux=disabled Steps to enable SELinux Change the status of SELinux service in&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"categories":[1],"tags":[5,11,12],"class_list":["post-68","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-cent-os","tag-linux","tag-selinux"],"_links":{"self":[{"href":"https:\/\/host2day.in\/blog\/wp-json\/wp\/v2\/posts\/68","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/host2day.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/host2day.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/host2day.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/host2day.in\/blog\/wp-json\/wp\/v2\/comments?post=68"}],"version-history":[{"count":11,"href":"https:\/\/host2day.in\/blog\/wp-json\/wp\/v2\/posts\/68\/revisions"}],"predecessor-version":[{"id":108,"href":"https:\/\/host2day.in\/blog\/wp-json\/wp\/v2\/posts\/68\/revisions\/108"}],"wp:attachment":[{"href":"https:\/\/host2day.in\/blog\/wp-json\/wp\/v2\/media?parent=68"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/host2day.in\/blog\/wp-json\/wp\/v2\/categories?post=68"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/host2day.in\/blog\/wp-json\/wp\/v2\/tags?post=68"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}