 




<?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>Open Source Software and Linux &#187; setsebool</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/linux-lotus-domino/tag/setsebool/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/linux-lotus-domino</link>
	<description></description>
	<lastBuildDate>Thu, 02 May 2013 21:07:56 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>SELinux and what I&#8217;ve learned in the last two days..</title>
		<link>http://itknowledgeexchange.techtarget.com/linux-lotus-domino/selinux-and-what-ive-learned-in-the-last-two-days/</link>
		<comments>http://itknowledgeexchange.techtarget.com/linux-lotus-domino/selinux-and-what-ive-learned-in-the-last-two-days/#comments</comments>
		<pubDate>Fri, 21 Nov 2008 20:28:29 +0000</pubDate>
		<dc:creator>Xjlittle</dc:creator>
				<category><![CDATA[centos]]></category>
		<category><![CDATA[getsebool]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[selinux]]></category>
		<category><![CDATA[selinux apache]]></category>
		<category><![CDATA[selinux httpd]]></category>
		<category><![CDATA[selinux mysql]]></category>
		<category><![CDATA[selinux nfs]]></category>
		<category><![CDATA[setsebool]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/linux-lotus-domino/selinux-and-what-ive-learned-in-the-last-two-days/</guid>
		<description><![CDATA[I am bringing up a new Virtual Host with VMs of MySQL, music-repo and a webserver. All of these are on CentOS with SELinux enabled. No, I&#8217;m not a glutton for punishments using SELinux for all of these machines that are interconnected to each other. I believe the time is coming when organizations are going [...]]]></description>
				<content:encoded><![CDATA[<p>I am bringing up a new Virtual Host with VMs of MySQL, music-repo and a webserver.  All of these are on CentOS with SELinux enabled.  No, I&#8217;m not a glutton for punishments using SELinux for all of these machines that are interconnected to each other.  I believe the time is coming when organizations are going to insist on the type of security that SELinux provides.</p>
<p>Moving on I mentioned that my MySQL server is on one box and my web server on another.  One of the applications that I use is <a href="http://www.kplaylist.net/">KPlaylist</a>.  This is a streaming server for mp3s, movies or just about anything you want to stream.  My first snag was getting it to log into MySQL and create the database.</p>
<p>After about an hour of looking for normal causes I decided to turn on setroubleshoot.  This is a great tool when looking for SELinux problems.  After I turned it on I found this in /var/log/messages:</p>
<blockquote><p>Nov 20 15:40:47 web setroubleshoot: SELinux is preventing the http daemon from connecting to network port 3306 For complete SELinux messages. run sealert -l 65919ff0-ddd1-4a4b-801d-f54023da86ac</p></blockquote>
<p>So then I ran the sealert command shown in the message:<br />
<code><br />
sealert -l 65919ff0-ddd1-4a4b-801d-f54023da86ac<br />
</code><br />
This gave me the following along with some other information:<br />
<code><br />
setsebool -P httpd_can_network_connect=1<br />
</code></p>
<p>Voila! My problem was fixed.  Well almost.  I then discovered that iptables was  blocking the port.  After opening the port using the gui &#8220;system-config-securitylevel&#8221; all was well.  KPLaylist installed it&#8217;s database just like it was supposed to.</p>
<p>My next hurdle was getting the nfs share on the music-repo server to mount on to the web server.  Checking for another sealert I found one on the webserver called </p>
<blockquote><p>Nov 20 23:57:33 web setroubleshoot: SELinux prevented the http daemon from reading files stored on a NFS filesytem. For complete SELinux messages. run sealert -l f76bd0be-d375-436f-9c09-2086da0d7a39</p></blockquote>
<p>After running this I got the following information:<br />
<code><br />
setsebool -P httpd_use_nfs=1<br />
</code></p>
<p>Well this didn&#8217;t totally solve my problem but I did notice that things were getting fixed with the setsebool command.  I went looking around the net to see what I could learn about it.</p>
<p>What I learned is that if you are having a problem with a service is that you should run the command getsebool -a |grep someservice.  I decided to try that with NFS and this is what I got:<br />
<code><br />
[root@music-repo ~]# getsebool -a |grep nfs<br />
allow_ftpd_use_nfs --&gt; off<br />
allow_nfsd_anon_write --&gt; off<br />
nfs_export_all_ro --&gt; on<br />
nfs_export_all_rw --&gt; on<br />
nfsd_disable_trans --&gt; off<br />
samba_share_nfs --&gt; off<br />
use_nfs_home_dirs --&gt; off<br />
[root@music-repo ~]#<br />
</code><br />
The last line was what I found interesting.  I had originally had my music directory on the music-repo machine at the root of the system.  My thought was OK let&#8217;s create a user with a home directory and enable that boolean.  I created a user on the musiic-repo system called apache and moved the /music directory into /home/apache.  I then ran the command:<br />
<code><br />
setsebool -P use_nfs_home_dirs=on<br />
</code></p>
<p>I also moved my music directory that I was mounting to under /var/www which is apache&#8217;s home and ran the same command.  Now everything was connected and working like it is supposed to be.</p>
<p>A note of interest to those of you who would prefer a gui..you should install policycoreutils-gui.  This will give you a nice gui called system-config-selinux.  In this gui you can browse through everthing SELinux has to say and can change.  </p>
<p>Now to get that setup as a share for the Windows users so that they can store their music and get it backed up.</p>
<p>-j</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/linux-lotus-domino/selinux-and-what-ive-learned-in-the-last-two-days/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
