8

Trying to do the following:

mkdir /Volumes/temp
mount_webdav davs://myusername@webdav.yandex.ru: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:mypass@webdav.yandex.ru:443 /Volumes/temp
mount_webdav -s https://myusername:mypass@webdav.yandex.ru:443 /Volumes/temp

It doesn't work.

Hennes
  • 64,768
  • 7
  • 111
  • 168
LA_
  • 616
  • 3
  • 8
  • 26

4 Answers4

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.

l'L'l
  • 3,348
  • 1
  • 15
  • 9
  • 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 '14 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 '14 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 '14 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 '14 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 '14 at 07:32
  • Btw, when I input url with the port number in the keychain, port number is automatically deleted after record saving. – LA_ Jan 11 '14 at 07:36
  • Here is some instruction how to pass login and name to mount_webdav - http://hints.macworld.com/article.php?story=20020207214002198&query=mount_webdav, but I can not understand it :( – LA_ Jan 11 '14 at 08:01
  • In my case this command fails silently and nothing happens... :( – Óscar Gómez Alcañiz Apr 01 '20 at 10:04
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.

hemancuso
  • 11
  • 1
  • 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 '18 at 23:22
  • There is other tools in the App Store these days too: [ocsmount](https://apps.apple.com/de/app/ocsmount/id1411490371?l=en&mt=12), [Mountain Duck](https://apps.apple.com/de/app/mountain-duck/id1024974133?l=en&mt=12), [Transmit](https://apps.apple.com/de/app/transmit-5/id1436522307?l=en&mt=12), [Forklift](https://apps.apple.com/de/app/forklift-file-manager-and-ftp-sftp-webdav-amazon-s3-client/id412448059?l=en&mt=12). – guruz Jun 19 '19 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.

clami219
  • 405
  • 1
  • 4
  • 9