LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Apache2 Require user with Require group (https://www.linuxquestions.org/questions/linux-server-73/apache2-require-user-with-require-group-615587/)

Russianspi 01-22-2008 05:29 PM

Apache2 Require user with Require group
 
Hi. I am transitioning an Apache 2.2.4 server from using mod_auth_mysql for authentication to using auth_basic. Although mod_auth_mysql is a neat solution, it was hard on my sql server. This is a small, company database, and at the direction of someone who had tried something similar, I will use a python script to run daily and update my .htaccess and .htgroup files. Because of that change, I need to change my configuration files to set up access to my protected directories again. This has been a relatively uneventful process, except for one thing: In apache2_mod_auth_mysql, if, in your <Directory> section, you use:
Code:

require user jdoe jsmith
require group admin

then jdoe, jsmith AND everyone in the admin group have access to the directory, regardless of which group jdoe and jsmith belong to.

This doesn't seem to me to be the way that auth_basic in Apache 2.2.4 works. From what I can tell (in my limited experiments), that same code above would allow only jdoe and jsmith access to the directory, and only if they were in the group "admin". Is there a way to make this work like these same directives in mod_auth_mysql? I would have to rewrite my whole group structure to make this change otherwise.

I have searched the Apache 2.2 manual, but can't seem to find anything on this topic. Google doesn't seem to have any easy answers, either. Please help! Thanks!

tbelote 01-29-2008 01:27 AM

Does adding this help?:

Satisfy All


http://httpd.apache.org/docs/2.2/mod/core.html#satisfy

Russianspi 01-30-2008 11:21 AM

Default Value
 
I wish it did. It seems, from looking at the directive, Satisfy All is the default value. I tried this without defining Satisfy several times. But thanks!


All times are GMT -5. The time now is 12:34 AM.