<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Mac OS X 10.5: Web Sharing &#8211; &#8220;Forbidden 403&#8243; on http://localhost/~username</title>
	<atom:link href="http://techtrouts.com/mac-os-x-105-web-sharing-forbidden-403-on-httplocalhostusername/feed/" rel="self" type="application/rss+xml" />
	<link>http://techtrouts.com/mac-os-x-105-web-sharing-forbidden-403-on-httplocalhostusername/</link>
	<description>Doin' the dev dance o/</description>
	<lastBuildDate>Fri, 23 Jul 2010 17:33:52 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Stellablue</title>
		<link>http://techtrouts.com/mac-os-x-105-web-sharing-forbidden-403-on-httplocalhostusername/comment-page-1/#comment-141</link>
		<dc:creator>Stellablue</dc:creator>
		<pubDate>Fri, 09 Jul 2010 22:59:21 +0000</pubDate>
		<guid isPermaLink="false">http://techtrouts.com/mac-os-x-105-web-sharing-forbidden-403-on-httplocalhostusername/#comment-141</guid>
		<description>Good post and comments!  #24 part 3 fixed it for me.  I did not need to change httpd.conf and user.conf was setup already.  #31 has good point in a shared environment with multiple users &amp; sites.  I think it is a good idea to keep all sites (&amp; files) in one spot (ie: /library/webserver/documents) and setup user-owned folders...But to each his own.

Unix is sure powerful tho - Stellablue</description>
		<content:encoded><![CDATA[<p>Good post and comments!  #24 part 3 fixed it for me.  I did not need to change httpd.conf and user.conf was setup already.  #31 has good point in a shared environment with multiple users &amp; sites.  I think it is a good idea to keep all sites (&amp; files) in one spot (ie: /library/webserver/documents) and setup user-owned folders&#8230;But to each his own.</p>
<p>Unix is sure powerful tho &#8211; Stellablue</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jk</title>
		<link>http://techtrouts.com/mac-os-x-105-web-sharing-forbidden-403-on-httplocalhostusername/comment-page-1/#comment-139</link>
		<dc:creator>jk</dc:creator>
		<pubDate>Mon, 28 Jun 2010 16:50:50 +0000</pubDate>
		<guid isPermaLink="false">http://techtrouts.com/mac-os-x-105-web-sharing-forbidden-403-on-httplocalhostusername/#comment-139</guid>
		<description>Fantastic!  The Apple fix didn&#039;t work for me but this one did after I removed the user.conf file I created using the Apple fix...

Thanks for the tip!</description>
		<content:encoded><![CDATA[<p>Fantastic!  The Apple fix didn&#8217;t work for me but this one did after I removed the user.conf file I created using the Apple fix&#8230;</p>
<p>Thanks for the tip!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: YurikRecords</title>
		<link>http://techtrouts.com/mac-os-x-105-web-sharing-forbidden-403-on-httplocalhostusername/comment-page-1/#comment-138</link>
		<dc:creator>YurikRecords</dc:creator>
		<pubDate>Sun, 20 Jun 2010 13:30:20 +0000</pubDate>
		<guid isPermaLink="false">http://techtrouts.com/mac-os-x-105-web-sharing-forbidden-403-on-httplocalhostusername/#comment-138</guid>
		<description>http://support.apple.com/kb/TA25038
it worked</description>
		<content:encoded><![CDATA[<p><a href="http://support.apple.com/kb/TA25038" rel="nofollow">http://support.apple.com/kb/TA25038</a><br />
it worked</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stvs</title>
		<link>http://techtrouts.com/mac-os-x-105-web-sharing-forbidden-403-on-httplocalhostusername/comment-page-1/#comment-132</link>
		<dc:creator>stvs</dc:creator>
		<pubDate>Thu, 27 May 2010 16:40:39 +0000</pubDate>
		<guid isPermaLink="false">http://techtrouts.com/mac-os-x-105-web-sharing-forbidden-403-on-httplocalhostusername/#comment-132</guid>
		<description>All the methods described here are insecure, and Apple isn&#039;t helping by forcing people to open their home directories as read-all to get web sharing to work.

I DO NOT recommend giving EVERYONE read permission to your home directory, nor do I recommend the method described above of changing &quot;Allow from all&quot; in /private/etc/apache2/httpd.conf.

Rather, I recommend creating a separate &quot;/Users/Shared&quot; directory with a corresponding weak Shared user account, then hosting content from the Shared directory.

You can also use /Users/Shared to keep things like photos, music, virtual disk images, and other items that you do not necessarily wish FileVault to encrypt.

As root, do these steps:

# create /Users/Shared and user Shared with no login capability:

mkdir /Users/Shared
mkdir /Users/Shared/Sites
mkdir /Users/Shared/Sites/images

dscl localhost -create /Local/Default/Users/Shared
dscl . -create /Users/Shared UniqueID 511
[dsexport users.out /Local/Default dsRecTypeStandard:Users ; less users.out to find next UniqueID -- see http://osxdaily.com/2007/10/29/how-to-add-a-user-from-the-os-x-command-line-works-with-leopard/]
dscl . -create /Users/Shared UserShell /usr/bin/false  # no login for Shared!
dscl . -create /Users/Shared PrimaryGroupID 20  # staff
dscl . -create /Users/Shared NFSHomeDirectory /Users/Shared
# change ownership, permissions
chown -R Shared:staff /Users/Shared
chown -R 775 /Users/Shared

# create apache conf file
cp -p /etc/apache2/users/myusername.conf /etc/apache2/users/Shared.conf
nano /etc/apache2/users/Shared.conf
[Edit first line to use directory &quot;/Users/Shared/Sites/&quot;]
httpd -k restart

# copy over default web pages to /Users/Shared/Sites
cp -p ~myusername/Sites/index.html /Users/Shared/Sites
cp -p ~myusername/Sites/images/macosxlogo.gif /Users/Shared/Sites/images
cp -p ~myusername/Sites/images/apache_pb.gif /Users/Shared/Sites/images
cp -p ~myusername/Sites/images/web_share.gif /Users/Shared/Sites/images

Now log out of root, and either under a new shell (bash/sh/tcsh/whatever) or a new Terminal window, you ought to be able to &quot;cd ~Shared&quot; to get to /Users/Shared. Sanity check your permissions using:
ls -ld /Users/Shared.  If you don&#039;t want all staff to have write access to /Users/Shared and below, then:
chmod -R g-w /Users/Shared

Now Stop/Start System Preferences&gt;Sharing&gt;Web Sharing, and point your browser to:

http://localhost/~Shared

That should work. Now host from /Users/Shared without anyone being able access to your home directory. If you edited /private/etc/apache2/httpd.conf to &quot;Allow from all&quot; as default, change this back to &quot;Deny from all&quot; as default, and restart httpd and Web Sharing.</description>
		<content:encoded><![CDATA[<p>All the methods described here are insecure, and Apple isn&#8217;t helping by forcing people to open their home directories as read-all to get web sharing to work.</p>
<p>I DO NOT recommend giving EVERYONE read permission to your home directory, nor do I recommend the method described above of changing &#8220;Allow from all&#8221; in /private/etc/apache2/httpd.conf.</p>
<p>Rather, I recommend creating a separate &#8220;/Users/Shared&#8221; directory with a corresponding weak Shared user account, then hosting content from the Shared directory.</p>
<p>You can also use /Users/Shared to keep things like photos, music, virtual disk images, and other items that you do not necessarily wish FileVault to encrypt.</p>
<p>As root, do these steps:</p>
<p># create /Users/Shared and user Shared with no login capability:</p>
<p>mkdir /Users/Shared<br />
mkdir /Users/Shared/Sites<br />
mkdir /Users/Shared/Sites/images</p>
<p>dscl localhost -create /Local/Default/Users/Shared<br />
dscl . -create /Users/Shared UniqueID 511<br />
[dsexport users.out /Local/Default dsRecTypeStandard:Users ; less users.out to find next UniqueID -- see <a href="http://osxdaily.com/2007/10/29/how-to-add-a-user-from-the-os-x-command-line-works-with-leopard/" rel="nofollow">http://osxdaily.com/2007/10/29/how-to-add-a-user-from-the-os-x-command-line-works-with-leopard/</a><br />
dscl . -create /Users/Shared UserShell /usr/bin/false  # no login for Shared!<br />
dscl . -create /Users/Shared PrimaryGroupID 20  # staff<br />
dscl . -create /Users/Shared NFSHomeDirectory /Users/Shared<br />
# change ownership, permissions<br />
chown -R Shared:staff /Users/Shared<br />
chown -R 775 /Users/Shared</p>
<p># create apache conf file<br />
cp -p /etc/apache2/users/myusername.conf /etc/apache2/users/Shared.conf<br />
nano /etc/apache2/users/Shared.conf<br />
[Edit first line to use directory "/Users/Shared/Sites/"]<br />
httpd -k restart</p>
<p># copy over default web pages to /Users/Shared/Sites<br />
cp -p ~myusername/Sites/index.html /Users/Shared/Sites<br />
cp -p ~myusername/Sites/images/macosxlogo.gif /Users/Shared/Sites/images<br />
cp -p ~myusername/Sites/images/apache_pb.gif /Users/Shared/Sites/images<br />
cp -p ~myusername/Sites/images/web_share.gif /Users/Shared/Sites/images</p>
<p>Now log out of root, and either under a new shell (bash/sh/tcsh/whatever) or a new Terminal window, you ought to be able to &#8220;cd ~Shared&#8221; to get to /Users/Shared. Sanity check your permissions using:<br />
ls -ld /Users/Shared.  If you don&#8217;t want all staff to have write access to /Users/Shared and below, then:<br />
chmod -R g-w /Users/Shared</p>
<p>Now Stop/Start System Preferences&gt;Sharing&gt;Web Sharing, and point your browser to:</p>
<p><a href="http://localhost/~Shared" rel="nofollow">http://localhost/~Shared</a></p>
<p>That should work. Now host from /Users/Shared without anyone being able access to your home directory. If you edited /private/etc/apache2/httpd.conf to &#8220;Allow from all&#8221; as default, change this back to &#8220;Deny from all&#8221; as default, and restart httpd and Web Sharing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DronNick</title>
		<link>http://techtrouts.com/mac-os-x-105-web-sharing-forbidden-403-on-httplocalhostusername/comment-page-1/#comment-131</link>
		<dc:creator>DronNick</dc:creator>
		<pubDate>Tue, 25 May 2010 22:03:55 +0000</pubDate>
		<guid isPermaLink="false">http://techtrouts.com/mac-os-x-105-web-sharing-forbidden-403-on-httplocalhostusername/#comment-131</guid>
		<description>chmod 701 ~
chmod 705 ~/Sites</description>
		<content:encoded><![CDATA[<p>chmod 701 ~<br />
chmod 705 ~/Sites</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rich</title>
		<link>http://techtrouts.com/mac-os-x-105-web-sharing-forbidden-403-on-httplocalhostusername/comment-page-1/#comment-128</link>
		<dc:creator>Rich</dc:creator>
		<pubDate>Fri, 07 May 2010 20:18:41 +0000</pubDate>
		<guid isPermaLink="false">http://techtrouts.com/mac-os-x-105-web-sharing-forbidden-403-on-httplocalhostusername/#comment-128</guid>
		<description>Thank you so much sir!  I&#039;m a noob to this stuff and spent the entire morning trying to figure this one out.  Your post was the solution!</description>
		<content:encoded><![CDATA[<p>Thank you so much sir!  I&#8217;m a noob to this stuff and spent the entire morning trying to figure this one out.  Your post was the solution!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ray</title>
		<link>http://techtrouts.com/mac-os-x-105-web-sharing-forbidden-403-on-httplocalhostusername/comment-page-1/#comment-123</link>
		<dc:creator>Ray</dc:creator>
		<pubDate>Sat, 24 Apr 2010 01:47:47 +0000</pubDate>
		<guid isPermaLink="false">http://techtrouts.com/mac-os-x-105-web-sharing-forbidden-403-on-httplocalhostusername/#comment-123</guid>
		<description>You are brilliant, bravo. :)
I didn&#039;t think they&#039;d have &quot;Deny all&quot; in there, pfft</description>
		<content:encoded><![CDATA[<p>You are brilliant, bravo. :)<br />
I didn&#8217;t think they&#8217;d have &#8220;Deny all&#8221; in there, pfft</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://techtrouts.com/mac-os-x-105-web-sharing-forbidden-403-on-httplocalhostusername/comment-page-1/#comment-122</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Sun, 18 Apr 2010 04:32:29 +0000</pubDate>
		<guid isPermaLink="false">http://techtrouts.com/mac-os-x-105-web-sharing-forbidden-403-on-httplocalhostusername/#comment-122</guid>
		<description>Please elaborate on &quot;remember to adapt the &quot;&lt;Directory&quot;/Users?...&quot;  comment.  I have followed all of the instructions of this page with no results.</description>
		<content:encoded><![CDATA[<p>Please elaborate on &#8220;remember to adapt the &#8220;&lt;Directory&quot;/Users?&#8230;&quot;  comment.  I have followed all of the instructions of this page with no results.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Catzhead</title>
		<link>http://techtrouts.com/mac-os-x-105-web-sharing-forbidden-403-on-httplocalhostusername/comment-page-1/#comment-118</link>
		<dc:creator>Catzhead</dc:creator>
		<pubDate>Fri, 12 Mar 2010 08:23:36 +0000</pubDate>
		<guid isPermaLink="false">http://techtrouts.com/mac-os-x-105-web-sharing-forbidden-403-on-httplocalhostusername/#comment-118</guid>
		<description>Thanks for this post, very useful.

For those like me who forgot that they moved their home directory to another volume, remember to adapt the &quot;&lt;Directory &quot;/Users/...&quot; to the correct location, e.g. &quot;_&lt;</description>
		<content:encoded><![CDATA[<p>Thanks for this post, very useful.</p>
<p>For those like me who forgot that they moved their home directory to another volume, remember to adapt the &#8220;&lt;Directory &quot;/Users/&#8230;&quot; to the correct location, e.g. &quot;_&lt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mwandha Mufumbiro</title>
		<link>http://techtrouts.com/mac-os-x-105-web-sharing-forbidden-403-on-httplocalhostusername/comment-page-1/#comment-117</link>
		<dc:creator>Mwandha Mufumbiro</dc:creator>
		<pubDate>Fri, 05 Mar 2010 23:59:53 +0000</pubDate>
		<guid isPermaLink="false">http://techtrouts.com/mac-os-x-105-web-sharing-forbidden-403-on-httplocalhostusername/#comment-117</guid>
		<description>your post is exceptional after timewasting in searches i got to your solution and believe me you it works magic.</description>
		<content:encoded><![CDATA[<p>your post is exceptional after timewasting in searches i got to your solution and believe me you it works magic.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
