Search code examples
cfilesystemsfuse

Fuse lib example deleted my home folder


I was playing with a modified version of https://github.com/libfuse/libfuse/blob/master/example/passthrough.c and I mounted it in a folder in my home directory (home/joao/mnt). Without realizing that I was running it already, I re-ran the fuse programm and my computer stopped working. I rebooted the system and then I saw my home folder without most of the files that ithad before. Is there anything I can do to restore my old state?


Solution

  • I'm no way an expert, but I'm afraid you've lost everything unless you have a backup of your system... I can only give a hint. In passthrough.c it is said that

    This file system mirrors the existing file system hierarchy of the
    system, starting at the root file system. This is implemented by just "passing through" all requests to the corresponding user-space libc functions. Its performance is terrible.

    So, if I understood it right, every change you're applying to mounted passthrough FS affects your home dir. Or, since it mirrors your home dir, you could just make a pretty recursion by mounting it there and thus break something.