Hello. I have 2 servers, running on Centos 7.7 and docker 19.03 CE. I tried to use sshfs volumes, but something goes wrong.
I successfully creates volume with this command:[lanadmin@mordred ~]$ docker volume create --driver vieux/sshfs -o sshcmd=lanadmin@10.220.127.247:/home/test -o password=mypass sshvolume
But when i tries to use this volume in container i have an error like this:
[lanadmin@mordred ~]$ docker run -it -v sshvolume:/etc busybox ls /etc
docker: Error response from daemon: failed to copy file info for /var/lib/docker/plugins/518a1874166cf493dd0700d9efec1c3e2d7649cb4a560d44a2af1a6aa16f0526/propagated-mount/5cd59d97ef5e801349f7c06a8f2c113d: failed to chown /var/lib/docker/plugins/518a1874166cf493dd0700d9efec1c3e2d7649cb4a560d44a2af1a6aa16f0526/propagated-mount/5cd59d97ef5e801349f7c06a8f2c113d: lchown /var/lib/docker/plugins/518a1874166cf493dd0700d9efec1c3e2d7649cb4a560d44a2af1a6aa16f0526/propagated-mount/5cd59d97ef5e801349f7c06a8f2c113d: permission denied. See 'docker run --help'.
Also if i tries to use empty directory everything work fine.
And the most funny thing is when i put some file in /home/test there is no error with coping files when container runs and i have this files in /home/test:
lanadmin@ganimed ~]$ ls -lah /home/test/
итого 8,0K
drwxrwxrwx. 2 lanadmin lanadmin 4,0K сен 21 23:15 .
drwxr-xr-x. 5 root root 4,0K сен 21 18:48 ..
-rwxr-xr-x. 1 lanadmin lanadmin 0 сен 21 23:15 hostname
-rwxr-xr-x. 1 lanadmin lanadmin 0 сен 21 23:15 hosts
-rw-rw-r--. 1 lanadmin lanadmin 0 сен 21 23:14 notest.file
-rwxr-xr-x. 1 lanadmin lanadmin 0 сен 21 23:15 resolv.conf
Can anyone help me with that?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello,
It looks like a permissions issue, have you tried mounting a different folder besides /etc like /tmp for example?
I’ve tried recreating the setup at my end and it worked as expected with when using root:
[root@docker-test ~]# docker run -it -v sshvolume_test2:/etc busybox ls /etc
group hosts mtab passwd shadow
hostname localtime network resolv.conf
[root@docker-question ~]#
Regards, Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.