Difference between revisions of "WebDAV authentication"

From ArchWiki
Jump to: navigation, search
 
(Authentication)
Line 41: Line 41:
  
  
=== Authentication ===
+
=== Step 3: Authentication ===
 
There are numerous different protocols you can use:
 
There are numerous different protocols you can use:
 
* plain
 
* plain
Line 47: Line 47:
 
* others
 
* others
  
 +
This is an example for using digest (make sure it is enabled in httpd.conf)
 +
<pre>
 +
htdigest -c /etc/httpd/conf/passwd WebDAV foo
 +
</pre>
  
 
===Step 3: Restart apache===
 
===Step 3: Restart apache===
 
  (root@box httpd)# /etc/rc.d/httpd restart
 
  (root@box httpd)# /etc/rc.d/httpd restart

Revision as of 19:08, 18 December 2005


--Andreas 14:05, 18 December 2005 (EST)

Goals

The goal of this how to use simple authentication with WebDAV. Please refer to Cactus' superb write up on setting up WebDAV.

Required packages

  • apache
  • cadaver (for testing)


WebDav Configuration

Step 1: Edit /etc/httpd/conf/httpd.conf

Add the following line: DAVLockDB /var/log/httpd/DavLock/DavLockDB


<Location /dav>
DAV On
AuthType Digest
AuthName "WebDAV"
AuthDigestFile /etc/httpd/conf/passwd
require user foo
</Directory>


Step 2: Create needed directories and assign permissions

# mkdir -p /var/log/httpd/DavLock
# touch /var/log/httpd/DavLock/DavLockDB
# chown -R nobody.nobody /var/log/httpd/DavLock
# mkdir -p /home/httpd/html/dav
# chown -R nobody.nobody /home/httpd/html/dav


Step 3: Authentication

There are numerous different protocols you can use:

  • plain
  • digest
  • others

This is an example for using digest (make sure it is enabled in httpd.conf)

htdigest -c /etc/httpd/conf/passwd WebDAV foo

Step 3: Restart apache

(root@box httpd)# /etc/rc.d/httpd restart