Talk:WebDAV authentication

From ArchWiki
Jump to: navigation, search

Since im new at the wikis, can somebody help me figure out a couple things.

1) Where would the best place normally be for what i just wrote? --Wolfdogg 07:58, 24 January 2012 (EST)

Hi, I'm not into WebDAV at all, you should search for an already existing article on the subject (I assume you think WebDAV authentication is not the right one), and if you don't find one, just create it with a proper title. Be bold! Of course being as careful as you can :)
You may be interested in reading Help:Editing and Help:Style.
-- Kynikos 07:33, 25 January 2012 (EST)

2) Wheres the best place for the questions im asking now related to this article, in my talk? --Wolfdogg 07:58, 24 January 2012 (EST)

Nope, your talk page is the worst place, because it's supposed to be used by other users to contact you if they need to. This talk page would be the right place, but in this case I suggest to start a forum thread, possibly linking to this very page. -- Kynikos 07:33, 25 January 2012 (EST)

3)if this is worth being its own wiki, and should it be moved there, or should it be moved to a centralized DAV wiki, since they are now growing in numbers? Im willing to take on that task of merging the 3 or 4 Dav wikis into one, unless somebody decides they'd rather me not do that. --Wolfdogg 07:58, 24 January 2012 (EST)

It could be a good idea, just first illustrate your project more in detail, for example here, and make sure to adhere to Help:Style#Edit summary. -- Kynikos 07:33, 25 January 2012 (EST)

Dav for webfiles setup

This worked for me setting up a WebDAV connection for website development. It will probably work for other uses if you just edit the locations accordingly where you have your files located;

Edit Apache's Config


Make sure following is uncommented in /etc/httpd/conf/httpd.conf

 LoadModule dav_module        modules/
 LoadModule dav_fs_module     modules/
 LoadModule dav_svn_module    modules/
 LoadModule authz_svn_module  modules/
 Include conf/extra/httpd-dav.conf

If your using ssl, also make sure this is uncommented in /etc/httpd/conf/httpd.conf

 Include conf/extra/httpd-dav.conf


Edit /etc/httpd/conf/extra/httpd-dav.conf to something similar to this with the following conditions;

1) Assuming your apache document root is /srv/http, or edit to your needs

2) Omit or edit either the first or second <Directory> directive if you dont need access to that location

3) Insert your own username in place of YOUR_USERNAME

 # Distributed authoring and versioning (WebDAV)
 # Required modules: mod_dav, mod_dav_fs, mod_setenvif, mod_alias
 #                   mod_auth_digest, mod_authn_file
 # The following example gives DAV write access to a directory called
 # "uploads" under the ServerRoot directory.
 # The User/Group specified in httpd.conf needs to have write permissions
 # on the directory where the DavLockDB is placed and on any directory where
 # "Dav On" is specified.
 # NOTE, the dav directory also needs to have write permissions to the same
 # group that apache has (usually group http)
 # # chmod -r g+w /home/user/htdocs
 #Set the DavLock
 DavLockDB /srv/http/var/DavLock/DavLockDB
 #following breaks the dav connectability so be careful
 #Alias /dav "/srv/http"
 # Make our directory or location directive and enable dav for it
 #The following is for the server root
  <Directory /srv/http/dav>
       Dav On
       Order Allow,Deny
       Allow from all
       AuthType Digest
       AuthName "WebDAV"
       # You can use the htdigest program to create the password database:
       #  htdigest -c "/etc/httpd/conf/passwd"    WebDAV admin
       AuthUserFile /etc/httpd/conf/passwd
       # optional AuthDigestProvider
       # AuthDigestProvider file
       # Allow universal read-access, but writes are restricted
       # the following [<Limit> block] makes password active
       # without it any password will work
        <LimitExcept GET OPTIONS>
               Require user admin
 # The Following is for a userdir based setup
 <Directory /home/*/htdocs>
       Dav On
       Order Allow,Deny
       Allow from all
       AuthType Digest
       AuthName "WebDAV"
       AuthUserFile /etc/httpd/conf/passwd
       # the following makes password active
       # without it any password will work
        <LimitExcept GET OPTIONS>
              Require user YOUR__USERNAME
 # The following directives disable redirects on non-GET requests for
 # a directory that does not include the trailing slash.  This fixes a
 # problem with several clients that do not appropriately handle
 # redirects for folders with DAV methods.
 BrowserMatch "Microsoft Data Access Internet Publishing             
 Provider" redirect-carefully
 BrowserMatch "MS FrontPage" redirect-carefully
 BrowserMatch "^WebDrive" redirect-carefully
 BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully
 BrowserMatch "^gnome-vfs/1.0" redirect-carefully
 BrowserMatch "^XML Spy" redirect-carefully
 BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully

Make Files, Directories and Permissions

Create the directories, if they dont already exist

 # mkdir -p /srv/http/DavLock
 # mkdir -p /home/YOUR_USERNAME/htocs/dav #or your location of your web files

make file if doesnt exist

 # touch /srv/http/DavLock/DavLockDB

set up permissions

 # chown -R http.http /srv/http/DavLock 
 # chown -R YOUR_USERNAME.http /home/YOUR_USERNAME/htdocs
 # chmod -R g+w /home/YOUR_USERNAME/htdocs

Create Digest Password

set the user and password into htdigest (make sure you use -c option on first run no matter the user your setting up)

 htdigest -c /etc/httpd/conf/passwd WebDAV admin 
 htdigest /etc/httpd/conf/passwd WebDAV YOUR_USERNAME


Test out read access with a dav client;

Konqueror; [webdav://yourhost/yourshare]

Nautilus; 'file' 'open location' then enter url to your share

or try cadaver (not covered here)

Your share address if you followed the above would be http://yourhost/~YOUR_USERNAME/ or http://yourhost/dav/

test out the write access by trying to create a new directory with your dav client


If i figure out that WebDAVS autoversion is worth more than the problems it might cause, I might append this with info on that. its enabled like this

 <Location /repos>
     DAV svn
     SVNPath /http/srv/svn/repositories
     SVNAutoversioning on

Your supposed to be able to access all revisions from an svn command line, where when your access your web files from a client you only see one running version. Where that sounds cool, it might be a headache since every time you save a file, you get a new version, since it auto commits.

--Wolfdogg 07:22, 24 January 2012 (EST)