macosapachewebdavcyberduck

Unable to log in or write to WebDAV directory


I've configured WebDAV to run on my mac, by including the appropriate config file and throwing a config section in, like so:

Alias /SomeDav "/Users/user/Sites/Thing"

<Directory "/Users/user/Sites/Thing">
  Dav On

  Order Allow,Deny
  Allow from all

  AuthType Digest
  AuthName WebDAV-Realm
  AuthUserFile "/Users/user/webdav.passwd"

  <LimitExcept GET OPTIONS>
    require user "SomeWriter"
  </LimitExcept>
</Directory>

I then ran all the appropriate permission commands, and generated the password file, like so:

sudo htpasswd -c /Users/user/webdav.passwd "SomeWriter"
sudo chown -R www:www /Users/user/Sites/Thing/
sudo chown -R www:www /Users/user/webdav.passwd

If I try to connect to localhost/SomeDav, I succeed! I can see the contents of the directory in my browser (there's no request for authentication though...)

Now, if I try to connect to the site with CyberDuck, to test whether I can write to the directory, I run into issues. If I use SomeWriter as the user, and the appropriate password, CyberDuck keeps telling me my "Login Failed".

Am I missing something? Should this work?


Solution

  • You also require a DavLockDB command

    DavLockDB "/path/to/some/dir/DavLockDB"
    

    Dav will create a file /path/to/some/dir/DavLockDB, so make sure that the directory /path/to/some/dir/ is owned by www as well