Page 1 of 1
Forum

Welcome to the Tweaking4All community forums!
When participating, please keep the Forum Rules in mind!

Topics for particular software or systems: Start your topic link with the name of the application or system.
For example “MacOS X – Your question“, or “MS Word – Your Tip or Trick“.

Please note that switching to another language when reading a post will not bring you to the same post, in Dutch, as there is no translation for that post!



Share:
Notifications
Clear all

[Solved] WebDAV not working in 4.0.4?

13 Posts
3 Users
1 Reactions
814 Views
(@Anonymous)
Joined: 1 second ago
Posts: 0
Topic starter  

Hi all, firstly thank you very very much for your awesome software. I love it. However - I struggle to get a webDAV share mounted. I have used the IP but it shows me a "mount failed" hint. In my server logs I do not even see a connection coming up and I wonder if I am missing something?

Here is my info:

Version: 4.0.4 (Build 26)
OS: macOS Ventura
Version 13.1 (Build 22C65)
Intel x86-64 (64 bits) application

I have tried all kinds of definitions (IP, name, with https-qualifier, without, both fields and one) but no one seems to work. Any hints would be highly appreciated. Thank you very much in advance

Thomas


   
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 11 years ago
Posts: 2717
 

Hi Thomas,

nice to hear you're appreciating ConnectMeNow 😁 

Sorry to hear you're running into an issue. Unfortunately, I have very little opportunities to test WebDAV (since I do not use it).
So when I did setup a WebDav on my webserver, I couldn't get a connection to work at all (tried commandline, ConnectMeNow, ForkLift).

Do you have a working example (through commandline mount_webdav) that works?


   
ReplyQuote
(@Anonymous)
Joined: 1 second ago
Posts: 0
Topic starter  

Hi Hans,

thank you very much for your quick answer. I tried from my mac with the commandline mount_webdav to my server and that works

the syntax is:

mount_webdav -i  https://ip:443/webDAV/path 

where -i is interactive mode and you have to provide U&P. In non-interactive mode the syntax is:

mount_webdav user:pass <at-sign>  https://ip:443/webDAV/path 

Interactive mode works and I see it on my server as well but I have not tried non-interactive mode because I have special characters in my PW which need to be escaped.

Is this what you mean by a "working example"?

Thank you very very much for your help again. :)

Thomas

This post was modified 1 year ago 3 times by Anonymous

   
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 11 years ago
Posts: 2717
 

I did give it a try on my setup and for some reason that simply refuses to work form Terminal.

Example (cPanel likes to use port 2078 for this) failed:

mount_webdav -i  https://example.com:2078/public_html/testwebdav  ~/Mountpoints/davtest

The directory ~/Mountpoints/davtest exists, my firewall is not blocking port 2078, "-i" for interactive did ask for username and password.

The proper notation without "-i" should be (all part of the URL):

mount_webdav  https://username:password@example.com:2078/testwebdav  ~/MountPoints/davtest

But that doesn't seem to work either (no error message either, which seems a known issue with mount_webdav for a few years now already).
Mounting through Finder fails as well.

So yes that would be as close as it gets to a working example. Would be better (which you should NOT post here) to have a test account I could try. My specific setup on my server may be a reason why I cannot even get a basic connection going. 😊 


   
ReplyQuote
(@Anonymous)
Joined: 1 second ago
Posts: 0
Topic starter  

Thank you very very much Hans. Which Webserver do you use? I can share my Apache seetings if you wish or give you test access to my machine :)

Thomas


   
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 11 years ago
Posts: 2717
 

Hi Thomas,

I tested this on a webserver which runs cPanel, and I'd rather not tinker with the Apache config files outside of cPanel on that one.
I can try to see if I can run WebDAV on my QNAP - even though this may or may not be a good representation.

It is odd that it used to work in v3, since the mount code didn't really change.


   
ReplyQuote
(@Anonymous)
Joined: 1 second ago
Posts: 0
Topic starter  

Thank you very much Hans. When you debug the code - do you see that it establishes a connection?

Even if I enter an IP address into the server field I do not see anything in the server logs.


   
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 11 years ago
Posts: 2717
 

I see the connection already fail when using just mount_webdav in Terminal (not even touching CMN). 😞 


   
ReplyQuote
(@Anonymous)
Joined: 1 second ago
Posts: 0
Topic starter  

That is crazy Hans. mount_webdav works for me but not ConnectMeNow with the same credentials. How can I help you?


   
ReplyQuote
(@Anonymous)
Joined: 1 second ago
Posts: 0
 

I found this thread because I was unable to mount my personal WebDAV server. After troubleshooting I believe there is a bug where ConnectMeNow v4 cannot mount a WebDAV share where the "Path:" setting is root (/ or blank). Mounting a WebDAV server which serves from root (e.g. example.com) instead of a subdir (e.g. example.com/dav) is seemingly impossible via ConnectMeNow v4.0.16 and the earlier versions I tried.

When I use the 'mount_webdav' command line program macos can mount perfectly whether from root or a subdirectory. The bug appears to be with ConnectMeNow v4.

ConnectMeNow fails to mount a root directory WebDAV server under all circumstances I tried: 'Mount Path: Default' and 'Mount Path: Custom Path' with or without 'Do not create sub-directory for mounting'.

A workaround is to rewrite a subdirectory to root. A working example of this for me using nginx:

location /dav {                                                                                                                                                                                                                                                               
  return 307 $scheme://$host/dav/;                                                                                                                                                                                                                                            
}                                                                                                                                                                                                                                                                             
                                                                                                                                                                                                                                                                              
location /dav/ {                                                                                                                                                                                                                                                              
  rewrite ^/dav(/.*)$ $1 last;                                                                                                                                                                                                                                                
}

Interestingly when using 'Custom Path' with 'Do not create sub-directory for mounting' on a WebDAV mount served from subdirectory "dav" (i.e. the one currently working with ConnectMeNow) the directory name seems to be changed to "dav" in finder even though it mounts at the correct path specified in settings (e.g. MountPoints). I am not sure if that is related but personally I would prefer the directory name in finder would match the custom mount point. The icon is also a network drive icon which is neat.

If you are setting up a personal WebDAV server for testing, I have found that software called Dufs available on github at sigoden/dufs is a very simple CLI program which works well with no configuration.

I also found a seemingly nice free WebDAV host which hosts at a subdirectory (/dav) called InfiniCLOUD which was useful for initial testing. It could be useful for sanity checking at least. I am not going to link it so my post doesn't appear to be spam but it's a Japanese company. I can provide the url if requested.

Anyway thank you for this very nice software I appreciate it very much. I hope my post is helpful.


   
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 11 years ago
Posts: 2717
 

Thanks @posture3281 for the analysis and the appreciation! This is very helpful. 👍 
Makes me wonder if this conflicts with another bug fix (also "/" related).

I'll have to see if I can make some time to look into this.

Thank you for the tips on getting a test server up and running. Looked at Dufs but it seems to want to run a Docker (I'm allergic to Docker 😜). I've added the link though, just in case someone ends up here and wonders where Dufs can be found.

Maybe I'll give it a try on my NAS, or on my own webserver. Will see what seems easiest 😁 


   
ReplyQuote
(@Anonymous)
Joined: 1 second ago
Posts: 0
 

I am certainly no docker enthusiast either, I agree with you there. On the Dufs releases page there are pre-compiled binaries. It is also available through the Homebrew package manager for macOS and cargo which is a Rust package manger, presumably similar to pip for python or npm for nodejs.

Example usage on linux:

mkdir testing
cd testing
wget "https://github.com/sigoden/dufs/releases/download/v0.40.0/dufs-v0.40.0-x86_64-unknown-linux-musl.tar.gz"
tar -xvf dufs-v0.40.0-x86_64-unknown-linux-musl.tar.gz
./dufs &
./dufs --port 5001 --path-prefix dav

The end result of these commands will be two read-only file servers with HTTP and WebDAV support. The default directory served is current working directory, in this case 'testing'. The first server (./dufs &) serving from http://127.0.0.1:5000/ and the second (./dufs --port 5001 --path-prefix dav) serving from http://127.0.0.1:5001/dav/. For actual testing you would probably want to open two terminals and give the first 'dufs' command without an ampersand (puts the program in the background) because dufs will by default log directly to terminal.

Example installation and usage on macOS for anyone who has the Homebrew package manager:

brew install dufs
dufs --port 5001 &
dufs --port 5002 --path-prefix dav

Port 5000 seems to be taken by default on macOS so it is slightly different but I am sure you get the idea. Homebrew on macOS isn't required. It is possible to simply get the binary for either apple darwin aarch64 or x86_64 like the linux example above.

This is one lightweight and simple way on any platform to get two WebDAV servers running which satisfy the testing requirements (i.e. one serving from / and the other from /dav). Of course any other WebDAV server will work and there are many options.


   
Hans reacted
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 11 years ago
Posts: 2717
 

Thank you for the very useful info! It is very much appreciated!

In the next few days I'll probably spin up a Linux VM and see if I can do a few tests.

Thanks again 👍 😊 


   
ReplyQuote
Share: