问题
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