<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>SELinux &#8211; Hostry Help Center</title>
	<atom:link href="https://help.hostry.com/article-tags/selinux/feed/" rel="self" type="application/rss+xml" />
	<link>https://help.hostry.com</link>
	<description>Full information on how to use HOSTRY, provided by 24/7 community based support</description>
	<lastBuildDate>Mon, 08 Feb 2021 08:28:01 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.9.13</generator>

<image>
	<url>https://help.hostry.com/wp-content/uploads/cache/2021/01/cropped-apple-icon-180x180-1/836712163.png</url>
	<title>SELinux &#8211; Hostry Help Center</title>
	<link>https://help.hostry.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How To Enable or Reinstall SELinux on CentOS</title>
		<link>https://help.hostry.com/knowledge-base/how-to-enable-or-reinstall-selinux-on-centos/</link>
					<comments>https://help.hostry.com/knowledge-base/how-to-enable-or-reinstall-selinux-on-centos/#respond</comments>
		
		<dc:creator><![CDATA[Alex]]></dc:creator>
		<pubDate>Mon, 06 Jul 2020 07:18:32 +0000</pubDate>
				<guid isPermaLink="false">https://help.hostry.com/?post_type=ht_kb&#038;p=1850</guid>

					<description><![CDATA[SELinux (Security-Enhanced Linux) is a special mechanism that is responsible for kernel security. This guide will be useful for users with a CentOS 6, 7, and 8 virtual machine. Disable and uninstall SELinux Install SELinux SELinux will detect the /.autorelabel file upon reboot, and then reconfigure all the files in [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p><strong><a href="https://ru.wikipedia.org/wiki/SELinux">SELinux</a></strong> (Security-Enhanced Linux) is a special mechanism that is responsible for kernel security. This guide will be useful for users with a <strong>CentOS 6, 7, and 8 </strong>virtual machine.</p>



<h2 id="disable-and-uninstall-selinux" >Disable and uninstall SELinux</h2>



<pre class="wp-block-code"><code># setenforce 0
# yum remove selinux-policy\*
# rm -rf /etc/selinux/targeted /etc/selinux/config</code></pre>



<h2 id="install-selinux" >Install SELinux</h2>



<pre class="wp-block-code"><code># yum install selinux-policy-targeted
# yum install selinux-policy-devel policycoreutils
# touch /.autorelabel; reboot</code></pre>



<p>SELinux will detect the <strong>/.autorelabel </strong>file upon reboot, and then reconfigure all the files in the correct SELinux contexts. If you have many files in your virtual machine, then VPS may be unavailable for a long time.</p>



<p><strong>Note!</strong></p>



<p>If SELinux is not already installed, then you need to go to step 2 &#8211; installing SELinux. If SELinux is installed on your virtual server, then you need to remove it (to reset the policy to the default settings)</p>
]]></content:encoded>
					
					<wfw:commentRss>https://help.hostry.com/knowledge-base/how-to-enable-or-reinstall-selinux-on-centos/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Set SELinux to Permissive Mode</title>
		<link>https://help.hostry.com/knowledge-base/how-to-set-selinux-to-permissive-mode/</link>
		
		<dc:creator><![CDATA[Alex]]></dc:creator>
		<pubDate>Wed, 13 Jan 2021 12:11:41 +0000</pubDate>
				<guid isPermaLink="false">https://help.hostry.com/?post_type=ht_kb&#038;p=2928</guid>

					<description><![CDATA[SELinux (Security-Enhanced Linux) is an implementation of a compulsory access control system that can work in parallel with the classic selective access control system. The permissive mode in SELinux represents three specific categories of SELinux modes, whereas in general, we can say that in any particular case SELinux will be [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p><strong><a href="https://en.wikipedia.org/wiki/Security-Enhanced_Linux">SELinux (Security-Enhanced Linux)</a></strong> is an implementation of a compulsory access control system that can work in parallel with the classic selective access control system. The permissive mode in SELinux represents three specific categories of SELinux modes, whereas in general, we can say that in any particular case SELinux will be either &#8220;enabled&#8221; or &#8220;disabled&#8221;. These &#8220;Enforcing&#8221; and &#8220;Permissive&#8221; modes fall under the &#8220;Enabled&#8221; category. That is, this means that whenever SELinux is enabled, it will either run in forced mode.  </p>



<h2 id="methods-to-install-selinux-in-permissive-mode-on-centos-8" >Methods to Install SELinux in Permissive Mode on CentOS 8</h2>



<p>Before moving on to the Permissive method, it&#8217;s always a good idea to check the default SELinux state by running the following command in your terminal:</p>



<pre class="wp-block-code"><code>sestatus</code></pre>



<p>Executing this command will return the current SELinux mode and it will be &#8220;Permissive&#8221; as shown in the image below. However, as soon as you reboot your system, SELinux will return to forced execution mode.</p>



<h2 id="method-to-temporarily-install-selinux-in-permissive-mode-in-centos-8" >Method to Temporarily Install SELinux in Permissive Mode in CentOS 8</h2>



<p>This installation method means that this mode will only be enabled for the current session, and as soon as you restart your system, SELinux will return to its default operating mode, which is “Enforcing” mode. To enable this mode, you need to run the following command on your <strong>CentOS 8 </strong>terminal:</p>



<pre class="wp-block-code"><code>sudo setenforce 0</code></pre>



<p>By setting the &#8220;setenforce&#8221; flag to &#8220;0&#8221;, we are essentially changing its value to &#8220;Permissive&#8221; from &#8220;Enforcing&#8221;. Running this command will not display any output. Now, to check if SELinux is set to &#8220;Permissive&#8221; mode on CentOS 8 or not, we run the following command in the terminal:</p>



<pre class="wp-block-code"><code>getenforce</code></pre>



<h2 id="method-to-permanently-install-selinux-in-permissive-mode-on-centos-8" >Method to Permanently Install SELinux in Permissive Mode on CentOS 8</h2>



<p>In the method described above, this will only temporarily set SELinux to <strong>&#8220;Permissive&#8221;</strong> mode. However, if you want these changes to be present even after a system restart, you will need to access the SELinux configuration file as follows:</p>



<pre class="wp-block-code"><code>sudo nano /etc/selinux/config</code></pre>



<p>Now you need to check the SELinux status again to see if its mode has been changed to <strong>&#8220;Permissive&#8221; </strong>or not. You can do this by running the following command in your terminal:</p>



<pre class="wp-block-code"><code>sestatus</code></pre>



<p>You can see from the highlighted part of the image below that right now only the mode from the configuration file has been changed to<strong> &#8220;Permissive&#8221;</strong>, while the current mode is still<strong> &#8220;Enforcing&#8221;.</strong> Now, for our changes to take effect, we will restart our CentOS 8 system by running the following command in a terminal:</p>



<pre class="wp-block-code"><code>sudo shutdown –r now</code></pre>



<p>After restarting the system, when you check the SELinux state again with the<strong> &#8220;sestatus&#8221;</strong> command, you will notice that the current mode has also been set to <strong>&#8220;Permissive&#8221;</strong>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
