<?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>Kurinchi Blogger Scribbles ... &#187; ubuntu .htaccess protect files</title>
	<atom:link href="http://kurinchilamp.kurinchilion.com/tag/ubuntu-htaccess-protect-files/feed" rel="self" type="application/rss+xml" />
	<link>http://kurinchilamp.kurinchilion.com</link>
	<description>On Open Source Technologies</description>
	<lastBuildDate>Mon, 02 Jan 2012 06:14:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>UBUNTU .htaccess Password Protect Files Directories</title>
		<link>http://kurinchilamp.kurinchilion.com/2009/03/ubuntu-htaccess-password-protect-files-directories.html</link>
		<comments>http://kurinchilamp.kurinchilion.com/2009/03/ubuntu-htaccess-password-protect-files-directories.html#comments</comments>
		<pubDate>Sat, 14 Mar 2009 23:34:45 +0000</pubDate>
		<dc:creator>kurinchilamp</dc:creator>
				<category><![CDATA[LINUX]]></category>
		<category><![CDATA[Linux Server]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[ubuntu .htaccess protect files]]></category>
		<category><![CDATA[ubuntu password protect]]></category>

		<guid isPermaLink="false">http://kurinchilamp.kurinchilion.com/?p=196</guid>
		<description><![CDATA[Linux UBUNTU .htaccess Password Protect In Ubuntu server, .htaccess file access is disabled by default. Apache suggests in general that .htaccess be disabled if the users have access to the server&#8217;s configuration files. There may be cases when users do not have access to Apache&#8217;s configuration setting files or some acute cases where users run [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Linux UBUNTU .htaccess Password Protect</strong></p>
<p>In Ubuntu server, .htaccess file access is disabled by default. Apache suggests in general that .htaccess be disabled if the users have access to the server&#8217;s configuration files. </p>
<p>There may be cases when users do not have access to Apache&#8217;s configuration setting files or some acute cases where users run multiple applications which might need different access controls at private and public levels.<span id="more-196"></span></p>
<p>Getting to know how to access files at different levels will help in easy management of access levels.</p>
<p>In this step, we will see how we go about creating .htaccess file to password protect a directory/folder.</p>
<p>Go to the directory which you want to password protect and inside that folder create the file &#8220;.htaccess&#8221;. Ensure that you give read and execute permission for this file by issuing the command</p>
<p><strong>user@myhost:~# chmod 755 .htaccess</strong></p>
<p>The content of a basic .htaccess file will look like this</p>
<p><em>AuthUserFile /secured/.mypass<br />
AuthName &#8220;Authorized Access&#8221;<br />
AuthType Basic<br />
require valid-user</em></p>
<p>A slight variation of the .htaccess file can go a step further by limiting the users for only certain methods of access like POST, GET, PUT. Adding the below line instead of &#8220;require valid-user&#8221; will help you achieve this</p>
<p><em>&lt;Limit GET POST PUT&gt;<br />
  require valid-user<br />
&lt;/Limit&gt;</em></p>
<p>To password protect a single file in a folder we add the following lines to .htaccess file:</p>
<p><em>&lt;Files &#8220;personal-page.html&#8221;&gt;<br />
  require valid-user<br />
&lt;/Files&gt;</em></p>
<p>Read about <a href="http://kurinchilamp.kurinchilion.com/2010/03/linux-password-creation.html">password creation here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://kurinchilamp.kurinchilion.com/2009/03/ubuntu-htaccess-password-protect-files-directories.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

