Error 405 - Method Not Allowed but NC Client and NC Website Works

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, 29.0.5): 29.04
Operating system and version (eg, Ubuntu 24.04): Ubuntu 24.04
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.58
PHP version (eg, 8.3): 8.3
NGINX Version: 1.18.0

The issue you are facing:
I (and my users) can access and use the web interface fine, same with the nextcloud windows and OSX clients but using CyberDuck for DAV access fails with an error 405 Method Not Allowed response.

I’ve adjusted the path URL to different permutations and also copied the DAV url link from the nextcloud login in the lower left corner but still can’t use it.

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

Steps to replicate it:

  1. Use any webdav client, authenticate with valid credentials, get error.
  2. Change path to manually provide it - get same error.

The output of your Nextcloud log in Admin > Logging:

No references to issue in Nextcloud Log.

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

N/A

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

No references to issue in NGINX log or Apache.

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

Here's my NGINX Config:
server {

server_name xxxxx.xxxxx.com;

location / {

proxy_set_header Host $host;

proxy_set_header X-Real-IP $remote_addr;

proxy_set_header X-Forwarded-Proto https;

proxy_set_header X-Forwarded-Host $remote_addr;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

proxy_pass http://10.X.X.X.;

proxy_buffering off;

fastcgi_request_buffering off;

# Timeouts, give up to 5 minutes for slow apps.

proxy_connect_timeout 600;

proxy_send_timeout 600;

send_timeout 600;

proxy_read_timeout 600;

fastcgi_read_timeout 600;

}

location /.well-known/carddav {

return 301 $scheme://$host/remote.php/dav;

}

location /.well-known/caldav {

return 301 $scheme://$host/remote.php/dav;

}

#Logging:

access_log /var/log/nextcloud/access.log;

error_log /var/log/nextcloud/error.log;

listen [::]:443 ssl; # managed by Certbot

listen 443 ssl; # managed by Certbot

ssl_certificate /etc/letsencrypt/live/xxxxx.xxxxx.com-0001/fullchain.pem; # managed by Certbot

ssl_certificate_key /etc/letsencrypt/live/xxxxxx.xxxxxxx.com-0001/privkey.pem; # managed by Certbot

# include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot

# ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

# add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;

}

server {

if ($host = xxxxx.xxxxxxxx.com) {

return 301 https://$host$request_uri;

} # managed by Certbot

server_name xxxxx.xxxxxx.com;

listen [::]:80;

listen 80;
}

Update - local users works fine, users that authenticate using the LDAP/AD plugin appear to be the users affected.

Strange - but hopefully someone knows what that’s all about since the nextcloud client and website works fine with LDAP/AD users.

All I notice is that local users have this as their webdav path according to the website:

https://drive.domain.com/remote.php/dav/files/user0

And LDAP/AD users have this long string:

https://drive.domain.com/remote.php/dav/files/F6FFAE9F-317A-427C-B8E8-2010FFC35280

Thanks