9

Trying to do the following:

mkdir /Volumes/temp
mount_webdav davs://[email protected]:443 /Volumes/temp

It doesn't return any error, but /Volumes/temp is empty in result.

Here are the details of connection required (mac / linux), they are in Russian, but you may see details on screenshots.

Upd. The following works:

mount_webdav -i https://webdav.yandex.ru:443 /Volumes/temp

But in this case I have to input user name and password. I've tried the following:

mount_webdav https://myusername:[email protected]:443 /Volumes/temp
mount_webdav -s https://myusername:[email protected]:443 /Volumes/temp

It doesn't work.

4 Answers 4

4

In (at least) 10.9 and 10.10, mounting via WebDAV via the command line isn't easy -- the mount_webdav command does not work the way it is documented and fails silently leaving an empty mount point while the interactive version (-i) of the command works as expected. The non-interactive version files (specifically storing and retrieving of the login/password).

Here is a solution: https://github.com/childrss/webdav

3

The correct way to mount a WebDAV-enabled server directory in OS X is like the example you mentioned works. The reason it's asking for a username and password is because you've specified the -i argument, which denotes Interactive mode (you are prompted for the username and password).

To mount a webdav for a certain user you would use like this:

mount_webdav https://webdav.yandex.ru/username/ /Volumes/temp/

If you don't want to be prompted for the username and password then you can store the user credentials in your keychain.

see Apple's MOUNT_WEBDAV man page for more information.

8
  • I looked for the documentation you are referring to when was trying (that is why I've used option i). But it says nothing about keychain. I've just tried to use your approach, but it didn't help. It asked for permission to use keychain when I tried to connect first time, but the connection again wasn't created.
    – LA_
    Jan 10, 2014 at 18:37
  • @LA_, how do you mean the connection wasn't created? it didn't connect, or save the connection? and did you try it with the port added also?
    – l'L'l
    Jan 10, 2014 at 19:16
  • 1
    Unfortunately, mount_webdav doesn't return any result in both cases when connection is established and when it is not. So, each time I check the result by verifying content of /Volumes/temp. So, after command execution, /Volumes/temp was empty. I've tried with port number and without, https and http.
    – LA_
    Jan 10, 2014 at 19:55
  • @LA_, are the login credentials being stored in the keychain and being used for the connection? from what you're describing it almost appears as if it's not.
    – l'L'l
    Jan 10, 2014 at 20:05
  • I do not know how to check if they are really used, but when I try to connect, OSX asks my permission to use the keychain data.
    – LA_
    Jan 11, 2014 at 7:32
1

You can also use something like ExpanDrive that has a graphical interface and helps you set up and maintain the webDAV mount. Faster, too, and has some extra features.

2
  • Sounds good. What are the extra features that you use? Can you give an example of how to use the mount feature?
    – HackSlash
    Apr 18, 2018 at 23:22
  • There is other tools in the App Store these days too: ocsmount, Mountain Duck, Transmit, Forklift.
    – guruz
    Jun 19, 2019 at 14:44
0

I was looking for a solution to make automatic downloads through a command-line script connecting to a WebDav filesystem and found an open source software (for Mac and Windows) which really helped!

Cyberduck: https://cyberduck.io/

It provides both graphical user-interface and command-line options.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .