bindfs - Doesn't work for folder inside "/proc"
Asked Answered
A

1

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

Addieaddiego answered 29/3, 2018 at 21:56 Comment(2)
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?Fein
@Downvoter I put some more information in the thread. Thanks!Addieaddiego
O
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

Outroar answered 10/10, 2018 at 12:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.