Can't connect to server through WebDav

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 12.0.2): 15.0.5.3
Operating system and version (eg, Ubuntu 17.04): Kubuntu 18.04
Apache or nginx version (eg, Apache 2.4.25): Snap (I’m not sure which server version it is)
PHP version (eg, 7.1): 7.2.14

The issue you are facing:
Every time I try to connect to the server through WebDav, the server responds with the following output on the Android browser:

OCA\DAV\Connector\Sabre\Exception\PasswordLoginForbiddenpassword login forbidden
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<d:error xmlns:d="DAV:"xmlns:s="http://sabredav.org/ns"xmlns:o="http://owncloud.org/ns">
<s:exception>
OCA\DAV\Connector\Sabre\Exception\PasswordLoginForbidden
</s:exception>
<s:exception>...</s:exception>
<s:message/>
<o:hint xmlns:o="o:">password login forbidden</o:hint>
</d:error>
<d:error xmlns:d="DAV:"xmlns:s="http://sabredav.org/ns"xmlns:o="http://owncloud.org/ns">... 

</d:error>

On a Windows browser, it shows this instead:

Nextcloud
Unauthorized
Technical details
Remote Address: -Computer's External IP Address-
Request ID: BT48hYu4BfiuEeQEHKyt

Nextcloud – a safe home for all your data

Is this the first time you’ve seen this error? (Y/N): Yes.

Steps to replicate it:

  1. I try to connect to the server through the url on an Android device:

    https://example.com/remote.php/webdav

  2. I put in the correct username and password when the server requests for the information

  3. The resulting output is shown on the website.
    3a. On windows computers, instead of showing the XML file error, it shows that I am unauthorized to access the website. Countless reloads will result in the same message, but different “Request ID.”

The output of your Nextcloud log in Admin > Logging:

PASTE HERE

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

PASTE HERE

The output of your Apache/nginx/system log in /var/log/____:

PASTE HERE

Edit: Found that the server was installed using Snap, not Docker.

Is it possible that you’ve enabled 2FA login for your Nextcloud instance? If yes, you should make sure that you create a dedicated app password for the Nextcloud app on Android.

Ah, I see… I’ve set up 2FA login for my account, which has created numerous problems for some apps I installed on the server (like NextCloud Passwords and even WebDav as you indicated). How would I generate and enter a dedicated app password into WebDav?

Check-out Settings>Personal>Security>Devices & Sessions.

2 Likes

I think I found how to get the app password for accessing the files through WebDav. Thank you so much @j-ed!

1 Like