docker-volume-sshfs icon indicating copy to clipboard operation
docker-volume-sshfs copied to clipboard

Unable to mount sshfs-volume with docker user namespace enabled (userns-remap: default)

Open xklid101 opened this issue 5 years ago • 0 comments

It seems impossible to use sshfs with user namespace remapping enabled in docker daemon

Docker version is 18.09.3

/etc/docker/daemon.json contains

{
  "userns-remap": "default"
}

volume is created like this

docker volume create -d vieux/sshfs -o [email protected]:/home/xklid101/test/sshfs -o password=***** -o sshfs_debug -o allow_other sshvolume

then container run with volume mount

docker run --rm -it -v sshvolume:/testpath busybox ls /testpath

getting following error

docker: Error response from daemon: OCI runtime create failed: container_linux.go:344: starting container process caused "process_linux.go:424: container init caused \"rootfs_linux.go:58: mounting \\\"/var/lib/docker/231072.231072/plugins/32c5df882746a0eaedaf470c44898d3dee59bfc276e6fee59c62cd3a13106fe4/propagated-mount/993603044f06608361e593313e3ef6bc\\\" to rootfs \\\"/var/lib/docker/231072.231072/overlay2/63b1e7ddbe6df6ccae567e3154d14c027c0de48a50301744a9f6da90fdeafc29/merged\\\" at \\\"/testpath\\\" caused \\\"stat /var/lib/docker/231072.231072/plugins/32c5df882746a0eaedaf470c44898d3dee59bfc276e6fee59c62cd3a13106fe4/propagated-mount/993603044f06608361e593313e3ef6bc: permission denied\\\"\"": unknown.

When i turn off user namespace remapping and restart docker, everything works ok.

Is some more configuration needed to work with userns-remap: default enabled?

xklid101 avatar May 15 '19 09:05 xklid101