Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot makedir in some WebDAV external storage if trailing slash is removed #37189

Open
6 of 9 tasks
markNZed opened this issue Mar 12, 2023 · 0 comments
Open
6 of 9 tasks
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap feature: external storage technical debt

Comments

@markNZed
Copy link

⚠️ This issue respects the following points: ⚠️

  • This is a bug, not a question or a configuration/webserver/proxy issue.
  • This issue is not already reported on Github (I've searched it).
  • Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
  • Nextcloud Server is running on 64bit capable CPU, PHP and OS.
  • I agree to follow Nextcloud's Code of Conduct.

Bug description

When trying to create a directory in WebDAV external storage I see the following error in the WebDAV server: MKCOL can create a collection only server: , request: "MKCOL /images HTTP/1.1 As discussed at https://trac.nginx.org/nginx/ticket/1966 Nginx requires a trailing slash, this seems to be a requirement in WebDAV. This function

public static function normalizePath(string $path): string {
removes the trailing slash and it is indirectly used in mkdir
public function mkdir($path) {

A complicated workaround for NGINX exists https://www.robpeck.com/2020/06/making-webdav-actually-work-on-nginx/

Steps to reproduce

  1. Try to create a new directory on an Nginx webDAV server

Expected behavior

The MKCOL request includes a trailing slash

Installation method

Community Docker image

Operating system

Debian/Ubuntu

PHP engine version

None

Web server

None

Database engine version

None

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

NA

List of activated Apps

NA

Nextcloud Signing status

NA

Nextcloud Logs

NA

Additional info

NA

@markNZed markNZed added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Mar 12, 2023
@solracsf solracsf changed the title [Bug]: Cannot makedir in WebDAV external storage Cannot makedir in some WebDAV external storage if trailing slash is removed Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap feature: external storage technical debt
Projects
None yet
Development

No branches or pull requests

3 participants