Difference between revisions of "WebDAV authentication"

From ArchWiki
Jump to: navigation, search
(Remove Development Category. Not directly related to Development.)
(One intermediate revision by one other user not shown)
Line 1: Line 1:
[[Category:Networking (English)]]
--[[User:Andreas|Andreas]] 14:05, 18 December 2005 (EST)
--[[User:Andreas|Andreas]] 14:05, 18 December 2005 (EST)

Revision as of 04:33, 25 April 2012

Merge-arrows-2.pngThis article or section is a candidate for merging with WebDAV.Merge-arrows-2.png

Notes: please use the second argument of the template to provide more detailed indications. (Discuss in Talk:WebDAV authentication#)

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


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

DAVLockDB /var/log/httpd/DavLock/DavLockDB
<Location /dav>
AuthType Digest
AuthName "WebDAV"
AuthUserFile /etc/httpd/conf/passwd
Require user foo

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

Please make sure that the path is identical to the one you entered in your httpd.conf. Also when using digest you have to enter the AuthName from httpd.conf. For plain authentication you would not need this.

With the above setup the user *foo* is required for everything.

If you want to permit everybody to read, you could use this in your httpd.conf

<Location /dav>
AuthType Digest
AuthName "WebDAV"
AuthUserFile /etc/httpd/conf/passwd
require user foo

Step 4: Restart apache

# /etc/rc.d/httpd restart