bindfs - Doesn't work for folder inside “/proc”

放肆的年华 提交于 2019-12-07 15:53:42

问题


Bindfs doesn't work for folder inside "/proc"...

[root@some_host some_folder]# bindfs --map=root/<MY_USER> "/proc/<SOME_PID>/<SOME_FOLDER>" "/home/<MY_USER>/<SOME_FOLDER>"
Failed to resolve source directory `/proc/<SOME_PID>/<SOME_FOLDER>': No such file or directory
[root@some_host some_folder]# ls "/proc/<SOME_PID>/<SOME_FOLDER>"
some_file

Why?

Thanks!


UPDATE: Example with Docker container...

I ended up finding out that for some reason this command...

sudo bindfs --map=root/eduardo "/proc/$(docker inspect --format {{.State.Pid}} 255d)/root" "/home/eduardo/Data/Temp/20180329.1/root"

... make bindfs mount the host's file system (root directory) on the mount point and not the container's file system.

However the command...

ls "/proc/$(docker inspect --format {{.State.Pid}} 255d)/root"

... show the contents of the container's file system (root folder).

I can not see an explanation for this! It makes no sense! =|


回答1:


I released bindfs 1.13.10 with a workaround for this.

Explanation for why it didn't work: https://github.com/mpartel/bindfs/issues/66#issuecomment-428323548



来源:https://stackoverflow.com/questions/49565598/bindfs-doesnt-work-for-folder-inside-proc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!