oliver-la / docker-nginx-webdav

WebDAV (SabreDAV) Docker Image with authentication running on nginx.
12 stars 12 forks source link

404 not found on public webdav folder #2

Closed dminca closed 7 years ago

dminca commented 7 years ago

Created test dir with a file inside:

$HOME/WebDAVtest
└── foo.txt

Launched container, published port 8080, mounted volume $HOME/WebDAVtest and got 404 Not found for that resource.

Command issued to launch container

docker run \
--rm \
-ti \
-e WEBDAV_USERNAME=admin \
-e WEBDAV_PASSWORD=admin \
-p 8080:80 \
-v $HOME/WebDAVtest:/var/webdav/public \
xama/nginx-webdav

# errors thrown when client connects
2017/05/05 08:08:09 [error] 77#0: *1 directory index of "/var/webdav/" is forbidden, client: 172.17.0.1, server: _, request: "GET / HTTP/1.1", host: "localhost:8080"
172.17.0.1 - webdav [05/May/2017:08:08:09 +0000] "GET / HTTP/1.1" 403 198 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36 OPR/44.0.2510.1218"
172.17.0.1 - webdav [05/May/2017:08:08:17 +0000] "GET /foo.txt HTTP/1.1" 404 200 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36 OPR/44.0.2510.1218"

The 403-Forbidden is correct, but the 404-Not found is the issue.

oliver-la commented 7 years ago

It's a permissions issue. Should be fixed now, although it's not a perfect solution. https://github.com/xama5/docker-nginx-webdav/commit/aa6d2df4926425139e01a33e4ab413ab0dd4a4d1#diff-80423f13d45b53af35790ffc6009be4dR7

In my tests it works fine now, can you please verify?

(the fix should've gotten a separate commit - I've noticed it far too late)

dminca commented 7 years ago

I've detailed the fixes in commit #3