<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:admin="http://webns.net/mvcb/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
	<channel> 

	<title>Comments on: .htaccess files and groups</title>
	<link>http://ask.metafilter.com/96318/htaccess-files-and-groups/</link>
	<description>Comments on Ask MetaFilter post .htaccess files and groups</description>
	<pubDate>Fri, 11 Jul 2008 09:50:36 -0800</pubDate>
	<lastBuildDate>Fri, 11 Jul 2008 09:50:36 -0800</lastBuildDate>
	<language>en-us</language>
	<docs>http://blogs.law.harvard.edu/tech/rss</docs>
	<ttl>60</ttl>

	<item>
		<title>Question: .htaccess files and groups</title>
		<link>http://ask.metafilter.com/96318/htaccess-files-and-groups</link>	
		<description>I&apos;m configuring some htaccess files for multiple directories and I&apos;m having some problems incorporating groups of authorized users.  &lt;br /&gt;&lt;br /&gt; Say there&apos;s 4 directories with protected content in each: 2005, 2006, 2007, 2008&lt;br&gt;
&lt;br&gt;
The people that have access are subscribers. Some users have access to all directories, and some users have access only for some. Access is granted based on password or IP address/range.&lt;br&gt;
&lt;br&gt;
For this situation I have an .htaccess file similar this in each directory:&lt;br&gt;
&lt;br&gt;
&lt;pre&gt;AuthType Basic&lt;br&gt;AuthName &quot;2008 Subscriptions&quot;&lt;br&gt;AuthUserFile /path/to/password/file/2008.pw&lt;br&gt;require valid-user&lt;br&gt;Satisfy any&lt;br&gt;order deny,allow&lt;br&gt;allow from 123.123.123.123&lt;br&gt;allow from 223.223.223.223&lt;br&gt;allow from 123.156.0.0/16&lt;br&gt;and so on&lt;br&gt;and so on&lt;br&gt;and so on&lt;br&gt;deny from all&lt;/pre&gt;This works perfectly for the situation described above.&lt;br&gt;
&lt;br&gt;
The IP addresses in the .htaccess files and users in the password files are pretty static. Once they are in there, they usually stay. However, there is a small group of people, we&apos;ll call them editors, that is very dynamic. People are constantly being added to and removed from this list. These editors should have access to all 4 directories. Currently they are given access permission via the password file shown above. This means that if an editor is added or removed, I have to make the change in 4 different files. Sometimes they are accidentally not added or removed to all the lists and then they complain and somebody has to fix it with a lot of back and forth and yada yada.&lt;br&gt;
&lt;br&gt;
I want to set up a group just for the editors. I want to have just one list that I have to edit instead of 4 whenever a change is made.&lt;br&gt;
&lt;br&gt;
However, from what I find in my searching, the way to add groups is to add the line: &lt;pre&gt;AuthGroupFile /path/to/editors/file/.htgroup&lt;/pre&gt; and inside this file add something like:&lt;pre&gt;editors: john sally joe&lt;/pre&gt;&lt;br&gt;
&lt;br&gt;
My questions:&lt;br&gt;
How do I assign passwords to these users? &lt;br&gt;
&lt;br&gt;
Does this mean that in addition to maintaining this htgroup file, I need to assign and maintain another password file as well? &lt;br&gt;
-If so, that isn&apos;t what I want because I only want to have to edit ONE file for the editors, NOT TWO.&lt;br&gt;
&lt;br&gt;
Is this possible?&lt;br&gt;
Am I going about this the wrong way?</description>
		<guid isPermaLink="false">post:ask.metafilter.com,2008:site.96318</guid>
		<pubDate>Fri, 11 Jul 2008 06:37:30 -0800</pubDate>
		<dc:creator>chillmost</dc:creator>
		
			<category>htaccess</category>
		
			<category>server</category>
		
			<category>apache</category>
		
			<category>permissions</category>
		
	</item> <item>
		<title>By: teraflop</title>
		<link>http://ask.metafilter.com/96318/htaccess-files-and-groups#1405111</link>	
		<description>First Apache verifies the user&apos;s credentials with the password file; then it checks the group file to see whether that user is authorized. As far as I can tell, it doesn&apos;t allow you to combine password and group information into one file. There is an option to do so with &lt;a href=&quot;http://httpd.apache.org/docs/2.0/mod/mod_auth_dbm.html&quot;&gt;mod_auth_dbm&lt;/a&gt;, but I&apos;ve never tried it. (What version of Apache are you running?)&lt;br&gt;
&lt;br&gt;
Is editing two files (independent of the number of protected directories) really such a big deal? If it is, why not just create a simple shell script that modifies both files for you?</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.96318-1405111</guid>
		<pubDate>Fri, 11 Jul 2008 09:50:36 -0800</pubDate>
		<dc:creator>teraflop</dc:creator>
	</item><item>
		<title>By: chillmost</title>
		<link>http://ask.metafilter.com/96318/htaccess-files-and-groups#1406059</link>	
		<description>&lt;em&gt;Is editing two files (independent of the number of protected directories) really such a big deal?&lt;/em&gt;&lt;br&gt;
&lt;br&gt;
Yes. It increases the possibility of error that we are trying to reduce. If I understand you correctly, this would actually increase the number of files I would have to edit. It seems that the way we have it now is the easiest. &lt;br&gt;
&lt;em&gt;If it is, why not just create a simple shell script that modifies both files for you?&lt;/em&gt;&lt;br&gt;
&lt;br&gt;
Because I don&apos;t know how. See you in a week with my new question about writing shell scripts. ;-) &lt;br&gt;
&lt;br&gt;
Actually, I&apos;ll see if I can whip up a little php/mysql backend thingie that will regenerate the files every time a change is made.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.96318-1406059</guid>
		<pubDate>Sat, 12 Jul 2008 01:30:12 -0800</pubDate>
		<dc:creator>chillmost</dc:creator>
	</item>
	</channel>
</rss>
