UNC path for WebDAV with cd '\\webdavsrv@SSL\path' or cd '\\webdavsrv@23456\path' will not work
Corinna Vinschen
corinna-cygwin@cygwin.com
Fri Feb 21 21:08:38 GMT 2025
On Feb 21 12:50, Martin Wege via Cygwin wrote:
> On Fri, Feb 21, 2025 at 11:29 AM Corinna Vinschen via Cygwin
> <cygwin@cygwin.com> wrote:
> > On Feb 20 23:36, Martin Wege via Cygwin wrote:
> > > And speaking of the "hostname", is this the \\hostname\path of an UNC?
> > > In that case this will not work with WebDAV/SSL or WebDAV with custom
> > > port, which might be \\webdavserver@SSL\path or
> > > \\webdavserver@23456\path, or \\webdavserver@SSL@23456\path
> > > You need to replace the L'@' with L'\0' before calling GetAddrInfoW(),
> > > or it is not going to work with WebDAV
> >
> > I never saw that before. Is that syntax really usable?
> >
> > I just spent half an hour trying to connect to a nextcloud instance
> > using this syntax, but to no avail. https://... works.
>
> Full command line, please.
Turns out, this wasn't working because I hadn't installed the CA
certificate for the nextcloud instance. The browser let me access the
cloud instance nevertheless, but with net use...
$ net use https://cloud.somedomain/remote.php/dav/files/corinna \
/user:corinna somepassword
System error 1244 has occurred.
As soon as I installed the certificate it started working!
$ net use https://cloud.somedomain/remote.php/dav/files/corinna \
/user:corinna somepassword
The command completed successfully.
And it started working in Cygwin with the patch removing the at-sign
prior to calling GetAddrInfoW:
$ ls -l // | grep cloud
dr-xr-xr-x 1 corinna vinschen 0 Feb 21 21:41 cloud01.somedomain@ssl
$ cd //cloud.somedomain@ssl/remote.php/dav/files/corinna
$ ls | head -1
Backup Musik 'Reasons to use Nextcloud.pdf'
> *PLEASE* push the patch to cut off the L'@'
Now that it works for me and I could actually test it, done. This will
be in test release 3.6.0-0.387.g8cebbb2b42bf.
Thanks for the input in terms of Webdav.
Corinna
More information about the Cygwin
mailing list