Description: | Group authorization using plaintext files |
---|---|
Status: | Base |
Module Identifier: | authz_groupfile_module |
Source File: | mod_authz_groupfile.c |
Compatibility: | Available in Apache 2.1 and later |
This module provides authorization capabilities so that authenticated users can be allowed or denied access to portions of the web site by group membership. Similar functionality is provided bymod_authz_dbm
.
Apache'sRequire
directives are used during the authorization phase to ensure that a user is allowed to access a resource. mod_authz_groupfile extends the authorization types withgroup
andgroup-file
.
Since v2.4.8,expressions are supported within the groupfile require directives.
This directive specifies group membership that is required for the user to gain access.
Require group admin
When this directive is specified, the filesystem permissions on the file being accessed are consulted. The user must be a member of a group with the same name as the group that owns the file. Seemod_authz_owner
for more details.
Require file-group
Description: | Sets the name of a text file containing the listof user groups for authorization |
---|---|
Syntax: | AuthGroupFilefile-path |
Context: | directory, .htaccess |
Override: | AuthConfig |
Status: | Base |
Module: | mod_authz_groupfile |
TheAuthGroupFile
directive sets the name of a textual file containing the list of user groups for user authorization.File-path is the path to the group file. If it is not absolute, it is treated as relative to theServerRoot
.
Each line of the group file contains a groupname followed by a colon, followed by the member usernames separated by spaces.
mygroup: bob joe anne
Note that searching large text files isvery inefficient;AuthDBMGroupFile
provides a much better performance.
Make sure that theAuthGroupFile
is stored outside the document tree of the web-server; donot put it in the directory that it protects. Otherwise, clients may be able to download theAuthGroupFile
.
Copyright 2025 The Apache Software Foundation.
Licensed under theApache License, Version 2.0.