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

writing files to webdav share / mountpoint of public links creates empty files (locking enabled) #553

Open
raidroGS opened this issue Mar 22, 2024 · 0 comments

Comments

@raidroGS
Copy link

raidroGS commented Mar 22, 2024

writing files to webdav share / mountpoint of public links leads to empty files if locking is enabled for client

If locking is disabled in Windows registry (HKLM\SYSTEM\CurrentControlSet\Services\WebClient\Parameters) resp. davfs2 config on linux, writing works as expected!

⚙️ How-to Reproduce

Steps to reproduce the behavior:

  1. Create a public, password not enabled
  2. Mount a subdirectory under the public link, f.e. landscape, with davfs2 on linux or create a network share on win10/11
  3. Open a file and write content into this file, save it
  4. Open file again (after file is synced to server), file is empty

relevant log information from cells

2024-03-22T07:54:35.855+0100	DEBUG	pydio.web.statics	AccessListFromUser - AccessList already in cache
2024-03-22T07:54:35.855+0100	DEBUG	pydio.web.statics	After Auth	{"time": "2.011975ms"}
2024-03-22T07:54:35.855+0100	DEBUG	pydio.web.statics	WS Roots In Cache	{"time": "3.47µs"}
2024-03-22T07:54:35.855+0100	DEBUG	pydio.web.statics	processing dav request on public link	{"inputPath": "landscape/a/test.txt", "davPrefix": "/public/8b22d9c16ce8/dav", "routerPrefix": "test", "davPath": "landscape/a/test.txt"}
2024-03-22T07:54:35.855+0100	DEBUG	pydio.gateway.dav	-- DAV ENTER	{"Method": "PUT", "path": "/public/8b22d9c16ce8/dav/landscape/a/test.txt"}
2024-03-22T07:54:35.855+0100	ERROR	pydio.web.statics	|- DAV END	{"method": "PUT", "path": "/public/8b22d9c16ce8/dav/landscape/a/test.txt", "error": "webdav: locked"}
github.com/pydio/cells/v4/common/log.(*logger).Error
	github.com/pydio/cells/v4/common/log/logger.go:127
github.com/pydio/cells/v4/gateway/dav.newHandler.func1
	github.com/pydio/cells/v4/gateway/dav/handler.go:112
golang.org/x/net/webdav.(*Handler).ServeHTTP
	golang.org/x/[email protected]/webdav/webdav.go:81
github.com/pydio/cells/v4/gateway/dav.newHandler.logRequest.func2
	github.com/pydio/cells/v4/gateway/dav/handler.go:57
net/http.HandlerFunc.ServeHTTP
	net/http/server.go:2136
github.com/pydio/cells/v4/gateway/dav.newHandler.HttpWrapperMeta.func4
	github.com/pydio/cells/v4/common/service/context/http-to-meta.go:126
net/http.HandlerFunc.ServeHTTP
	net/http/server.go:2136
github.com/pydio/cells/v4/frontend/front-srv/web/index.(*PublicHandler).ServeDAV
	github.com/pydio/cells/v4/frontend/front-srv/web/index/public.go:295
github.com/pydio/cells/v4/frontend/front-srv/web/index.(*PublicHandler).ServeHTTP
	github.com/pydio/cells/v4/frontend/front-srv/web/index/public.go:193
github.com/pydio/cells/v4/frontend/front-srv/web.init.0.func1.2.HttpWrapperMeta.func5
	github.com/pydio/cells/v4/common/service/context/http-to-meta.go:126
net/http.HandlerFunc.ServeHTTP
	net/http/server.go:2136
net/http.(*timeoutHandler).ServeHTTP.func1
	net/http/server.go:3397
2024-03-22T07:54:35.855+0100	DEBUG	pydio.grpc.docstore	GetDocument	{"store": "share", "docId": "8b22d9c16ce8"}
2024-03-22T07:54:35.856+0100	DEBUG	pydio.web.statics	Authenticate DAV on public link: 8b22d9c16ce8, Path: landscape/a/test.txt
2024-03-22T07:54:35.856+0100	DEBUG	pydio.web.statics	AccessListFromUser - AccessList already in cache
2024-03-22T07:54:35.856+0100	DEBUG	pydio.web.statics	After Auth	{"time": "77.018µs"}
2024-03-22T07:54:35.856+0100	DEBUG	pydio.web.statics	WS Roots In Cache	{"time": "2.633µs"}
2024-03-22T07:54:35.856+0100	DEBUG	pydio.web.statics	processing dav request on public link	{"inputPath": "landscape/a/test.txt", "davPrefix": "/public/8b22d9c16ce8/dav", "routerPrefix": "test", "davPath": "landscape/a/test.txt"}
2024-03-22T07:54:35.856+0100	DEBUG	pydio.gateway.dav	-- DAV ENTER	{"Method": "UNLOCK", "path": "/public/8b22d9c16ce8/dav/landscape/a/test.txt"}
2024-03-22T07:54:35.856+0100	ERROR	pydio.web.statics	|- DAV END	{"method": "UNLOCK", "path": "/public/8b22d9c16ce8/dav/landscape/a/test.txt", "error": "webdav: no such lock"}
github.com/pydio/cells/v4/common/log.(*logger).Error
	github.com/pydio/cells/v4/common/log/logger.go:127
github.com/pydio/cells/v4/gateway/dav.newHandler.func1
	github.com/pydio/cells/v4/gateway/dav/handler.go:112
golang.org/x/net/webdav.(*Handler).ServeHTTP
	golang.org/x/[email protected]/webdav/webdav.go:81
github.com/pydio/cells/v4/gateway/dav.newHandler.logRequest.func2
	github.com/pydio/cells/v4/gateway/dav/handler.go:57
net/http.HandlerFunc.ServeHTTP
	net/http/server.go:2136
github.com/pydio/cells/v4/gateway/dav.newHandler.HttpWrapperMeta.func4
	github.com/pydio/cells/v4/common/service/context/http-to-meta.go:126
net/http.HandlerFunc.ServeHTTP
	net/http/server.go:2136
github.com/pydio/cells/v4/frontend/front-srv/web/index.(*PublicHandler).ServeDAV
	github.com/pydio/cells/v4/frontend/front-srv/web/index/public.go:295
github.com/pydio/cells/v4/frontend/front-srv/web/index.(*PublicHandler).ServeHTTP
	github.com/pydio/cells/v4/frontend/front-srv/web/index/public.go:193
github.com/pydio/cells/v4/frontend/front-srv/web.init.0.func1.2.HttpWrapperMeta.func5
	github.com/pydio/cells/v4/common/service/context/http-to-meta.go:126
net/http.HandlerFunc.ServeHTTP
	net/http/server.go:2136
net/http.(*timeoutHandler).ServeHTTP.func1
	net/http/server.go:3397

🩺 Environment / Setup

Server Versions:

  • Cells Version 4.3.x, 4.4dev
  • MariaDB 10.5
  • Server OS: Debian 11/12

Client used for testing:

  • Win10 / 11 network share (webdav)
  • Linux (davfs2 mounted filesystem)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant