<?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/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
	xmlns:media="http://search.yahoo.com/mrss/"
>

<channel>
	<title>Albertux~# ./Blog &#187; selinux</title>
	<atom:link href="http://albertux.ayalasoft.com/tag/selinux/feed/" rel="self" type="application/rss+xml" />
	<link>http://albertux.ayalasoft.com</link>
	<description>61 20 64 65 76 65 6c 6f 70 65 72 20 6c 69 66 65</description>
	<lastBuildDate>Thu, 01 Jul 2010 16:23:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<!-- podcast_generator="podPress/8.8" - maintenance_release="8.8.5.3" -->
	<copyright>2008 </copyright>
	<managingEditor>albertoi7@gmail.com (Albertux~# ./Blog)</managingEditor>
	<webMaster>albertoi7@gmail.com (Albertux~# ./Blog)</webMaster>
	<category>posts</category>
	<ttl>1440</ttl>
	<image>
		<url>http://ayalasoft.com/img/podcast02.jpg</url>
		<title>Albertux~# ./Blog &#187; selinux</title>
		<link>http://albertux.ayalasoft.com</link>
		<width>144</width>
		<height>144</height>
	</image>
	<itunes:subtitle></itunes:subtitle>
	<itunes:summary>After three days without programming, life becomes meaningless.</itunes:summary>
	<itunes:keywords></itunes:keywords>
	<itunes:category text="Technology">
		<itunes:category text="Software How-To" />
	</itunes:category>
	<itunes:category text="Technology">
		<itunes:category text="Podcasting" />
	</itunes:category>
	<itunes:author>Albertux~# ./Blog</itunes:author>
	<itunes:owner>
		<itunes:name>Albertux~# ./Blog</itunes:name>
		<itunes:email>albertoi7@gmail.com</itunes:email>
	</itunes:owner>
	<itunes:block>no</itunes:block>
	<itunes:explicit>no</itunes:explicit>
	<itunes:image href="http://ayalasoft.com/img/podcast01.jpg" />
		<item>
		<title>Fedora 12 + Httpd + Userdir + SElinux Works</title>
		<link>http://albertux.ayalasoft.com/2010/01/30/fedora-12-httpd-userdir-selinux-works/</link>
		<comments>http://albertux.ayalasoft.com/2010/01/30/fedora-12-httpd-userdir-selinux-works/#comments</comments>
		<pubDate>Sun, 31 Jan 2010 00:02:01 +0000</pubDate>
		<dc:creator>albertux</dc:creator>
				<category><![CDATA[security]]></category>
		<category><![CDATA[unix/linux]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[selinux]]></category>
		<category><![CDATA[userdir]]></category>

		<guid isPermaLink="false">http://albertux.ayalasoft.com/?p=2443</guid>
		<description><![CDATA[Fedora 12 + Httpd + Userdir + SElinux Works First install LAMP stack see the guide on HowtoForge replace $USER for your username mkdir $USER/public_html firefox http://localhost/~$USER/ If you see only Forbidden (403), don&#8217;t worry, do this: I made a patch file (if you made custom changes on httpd.conf don&#8217;t use this file, do manual [...]<p><a href="http://albertux.ayalasoft.com/2010/01/30/fedora-12-httpd-userdir-selinux-works/">Fedora 12 + Httpd + Userdir + SElinux Works</a> is a post from: <a href="http://albertux.ayalasoft.com">Albertux~# ./Blog</a></p>
]]></description>
			<content:encoded><![CDATA[<p><strong>Fedora 12 + Httpd + Userdir + SElinux Works</strong></p>
<p>First install LAMP stack see the guide on <a href="http://www.howtoforge.com/installing-apache2-with-php5-and-mysql-support-on-fedora-12-lamp" target="_blank">HowtoForge</a></p>
<p>replace $USER for your username</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #007800;">$USER</span><span style="color: #000000; font-weight: bold;">/</span>public_html
firefox http:<span style="color: #000000; font-weight: bold;">//</span>localhost<span style="color: #000000; font-weight: bold;">/</span>~<span style="color: #007800;">$USER</span><span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p>If you see only Forbidden (403), don&#8217;t worry, do this:</p>
<p>I made a patch file (if you made custom changes on httpd.conf don&#8217;t use this file, do manual changes)</p>
<p>Install patch on your system and patch httpd.conf</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">yum <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #c20cb9; font-weight: bold;">patch</span></pre></div></div>

<p>my patch file:</p>

<div class="wp_syntax"><div class="code"><pre class="patch" style="font-family:monospace;">--- httpd-patch.conf	2010-01-30 14:59:51.811850034 -0800
+++ httpd.conf	2010-01-30 14:25:04.527864263 -0800
@@ -349,14 +349,15 @@
     # of a username on the system (depending on home directory
     # permissions).
     #
-    UserDir disabled
+    #UserDir disabled
+    UserDir enabled $USER
&nbsp;
     #
     # To enable requests to /~user/ to serve the user's public_html
     # directory, remove the &quot;UserDir disabled&quot; line above, and uncomment
     # the following line instead:
     # 
-    #UserDir public_html
+    UserDir public_html
&nbsp;
 &lt;/IfModule&gt;
&nbsp;
@@ -364,18 +365,18 @@
 # Control access to UserDir directories.  The following is an example
 # for a site where these directories are restricted to read-only.
 #
-#&lt;Directory /home/*/public_html&gt;
-#    AllowOverride FileInfo AuthConfig Limit
-#    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
-#    &lt;Limit GET POST OPTIONS&gt;
-#        Order allow,deny
-#        Allow from all
-#    &lt;/Limit&gt;
-#    &lt;LimitExcept GET POST OPTIONS&gt;
-#        Order deny,allow
-#        Deny from all
-#    &lt;/LimitExcept&gt;
-#&lt;/Directory&gt;
+&lt;Directory /home/*/public_html&gt;
+    AllowOverride FileInfo AuthConfig Limit
+    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
+    &lt;Limit GET POST OPTIONS&gt;
+        Order allow,deny
+        Allow from all
+    &lt;/Limit&gt;
+    &lt;LimitExcept GET POST OPTIONS&gt;
+        Order deny,allow
+        Deny from all
+    &lt;/LimitExcept&gt;
+&lt;/Directory&gt;
&nbsp;
 #
 # DirectoryIndex: sets the file that Apache will serve if a directory</pre></div></div>

<p>next do:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">patch</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>httpd<span style="color: #000000; font-weight: bold;">/</span>httpd.conf <span style="color: #000000; font-weight: bold;">&lt;</span> patch1.txt
<span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">711</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$USER</span>
<span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">755</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$USER</span><span style="color: #000000; font-weight: bold;">/</span>public_html
chcon <span style="color: #660033;">-R</span> <span style="color: #660033;">-t</span> httpd_sys_content_t <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$USER</span><span style="color: #000000; font-weight: bold;">/</span>public_html
setsebool <span style="color: #660033;">-P</span> httpd_enable_homedirs <span style="color: #000000;">1</span></pre></div></div>

<p>now:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">firefox http:<span style="color: #000000; font-weight: bold;">//</span>localhost<span style="color: #000000; font-weight: bold;">/</span>~<span style="color: #007800;">$USER</span><span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p>Done.</p>
<p><a href="http://albertux.ayalasoft.com/2010/01/30/fedora-12-httpd-userdir-selinux-works/">Fedora 12 + Httpd + Userdir + SElinux Works</a> is a post from: <a href="http://albertux.ayalasoft.com">Albertux~# ./Blog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://albertux.ayalasoft.com/2010/01/30/fedora-12-httpd-userdir-selinux-works/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
