Thu 4 Mar 2010
WebDAV linux share protected by LDAP Authentication
Posted by me under UncategorizedAdd Your Comments
Maybe you want your Mac, Windows and Linux users to be able to access/write to a shared environment. Maybe you want to use WebDAV instead of a samba/NFS share.* How do you do that? Maybe you’d also like to authenticate against your Active Directory server. Here’s an Apache configuration that works:
<VirtualHost *:80>
ServerName example.com
DocumentRoot /srv/webadmin.example.com/media
DAVLockDB /var/lock/apache2/DAVLock
<Directory /srv/webadmin.example.com/media >
RewriteEngine off
</Directory>
<Location "/">
DAV On
AuthType Basic
AuthName "Basic Research Media Server"
AuthBasicProvider ldap
AuthzLDAPAuthoritative off
AuthLDAPUrl "ldap://SERVER:389/ou=YOUR_OU,dc=EXAMPLE,dc=COM?sAMAccountName?sub?(objectClass=*)" NONE
AuthLDAPBindDN "CN=LDAPQuery,DC=EXAMPLE,DC=COM"
AuthLDAPBindPassword YOURPASSWORD
Require ldap-user YOURUSER1 YOURUSER2
</Location>
</VirtualHost>
note: Windows 7 has buggy WebDAV implementation, but you can use third party webDAVE software (AnyClient, for example) to bypass this.
* unlike NFS and SMB, you can easily access a WebDAV share over the Internet. And it’s faster in some cases.