fentas/docker-volume-davfs

Special chars within username

fentas opened this issue · 4 comments

@cocodrino:

sorry @fentas for ask this here, but you don't have an issue area...how could connect to one webdav server where the username has an @ ...like webdav.livedrive.com...my user would be like user@company.com ???

thank you so much

Sorry did not realize that issues were disabled.. Thanks for letting me know. I'll look into it.

Since the username and password are just contained within the URL, have you tried the following:

docker volume create \
  -d fentas/davfs \
  -o url=https?://user@comany.com:supersecretpassword@webdav.company.com

Or maybe already HTTP URL encoded (https://meyerweb.com/eric/tools/dencoder/)

docker volume create \
  -d fentas/davfs \
  -o url=https?://user%40comany.com:supersecretpassword@webdav.company.com

In my experience, the first one works most of the times, but I never tried it with davfs2.

Hi..thank so much for the answer...right now I'm getting this error

using both options described above

docker: Error response from daemon: error while mounting volume '/var/lib/docker/plugins/566511288d2f18e1a88a28442fa1155cd22e5a0144dd40f03f5845e7ebb5ce6d/rootfs': VolumeDriver.Mount: exit status 1.

a second question: many times in my local machine I've some troubles with davfs, so I need umount and remount the unit again, how could restore the webdav volume in a docker container???...do I need restart the whole container???

thank you so much for your patience...

best regards

Too bad. I had a look into the code (has been some time I touched it)
Here is the authentication happening https://github.com/fentas/docker-volume-davfs/blob/master/main.go#L313

Right now it is hard to say what the problem is. If you want you could try to debug it.
At the moment I am quite busy. But I try to squees it in in the next days or so.

For the second question: As far I know, sadly yes. Plugins spawn their own docker instance, doing their stuff within this context. This being said, this plugin will mount every davfs volume in its environment which in turn will be mounted from spawned user container.

Hi there,
I know it has been some time... Sorry for that. There are now two more driver_opts

  • -o username=...
  • -o password=...

Make sure to remove user and password from the URL.

Hope this helps. You have more problems feel free to reopen or create another issue.