I'm in the first steps with webdav.
To restrict access to a folder it's possible to use:
Require user myownuser
Is it possible to allow access to a group of users (like samba does)?
I'm in the first steps with webdav.
To restrict access to a folder it's possible to use:
Require user myownuser
Is it possible to allow access to a group of users (like samba does)?
I assume you are using Apache httpd 2.4 as your webdav server.
In that case, you can use the mod_authz_dbm
module or the mod_authnz_ldap
module to provide user and group information to Apache and use this in your <Directory>
statement for access control.
Something like this (untested and copied from the docs):
<Directory "/usr/local/apache2/htdocs/foo">
Require all granted
Dav On
AuthType Basic
AuthName DAV
AuthBasicProvider dbm
AuthDBMUserFile "site/data/users"
AuthDBMGroupFile "site/data/users"
Require dbm-group admin
</Directory>
Instead of mod_authz_dbm
and mod_authnz_ldap
, I'm going with mod_authz_groupfile
. Curious about the possible disadvantages of this in relation to the others?
Alias /webdav/tmp /var/www/webdav/tmp
<Location /webdav/tmp>
DAV On
AuthType Digest
AuthName "webdav"
AuthUserFile /etc/apache2/users.password
AuthGroupFile /etc/apache2/groups
Require group mygorup
</Location>