3

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! =|

Eduardo Lucio
  • 1,771
  • 2
  • 25
  • 43
  • Just tried it, with my own values... works fine. It's as simply as the message says, the /proc/ directory is not there. Maybe your process is not running anymore, so the PID directory is gone? – cadaniluk Mar 29 '18 at 22:07
  • @Downvoter I put some more information in the thread. Thanks! – Eduardo Lucio Mar 29 '18 at 22:39

1 Answers1

4

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

mpartel
  • 4,474
  • 1
  • 24
  • 31