encfs
encfs copied to clipboard
Request: Support for inotify in --reverse mode (Linux)
My use case involves bare files, with encfs running in --reverse mode to expose encrypted individual files for online backup. The reason the files are bare is that there is already full-disk encryption with LUKS; encfs is used so I'm not just exposing a single 16TB file to online backup :)
My request is for inotify support to be added to --reverse mode (if this is possible, I'll explain further down).
Currently, it looks like an application can set up an inotify watch on --reverse mounted directories. However, they don't appear to receive notifications when the underlying files are updated.
I can imagine that the implementation here would be along these lines - encfs would need to know when an inotify hook is placed on a file/directory in the FUSE-mounted container, and in turn place its own inotify hook with the same parameters on the underlying file/dir. It would then be notified when actions occur on the underlying node, so it could pass that notification up to the original process that placed the hook. Obviously, it would also need to know the opposite - when inotify hooks are torn down.
Is this possible? Meaning, as the FUSE driver, are you able to be notified when inotify hooks are placed/removed on nodes inside your mountpoint?
As I am also interested in this feature, I started looking around for information, and I came across this wiki page: https://github.com/libfuse/libfuse/wiki/Fsnotify-and-FUSE I am not too familiar with the structure of EncFS to start digging into it, but if you have any idea, I am open to suggestions. I will continue studying the code to see how to approach this...
I am also setting up a system for online backup like mcronce. It would be really nice to have inotify to allow lsyncd. Is anyone still working on this problem? (I seem sergiodavies has a note about FUSE being problem, and it looks like FUSE may not change :-( does that mean the only option is to move encfs into the kernel?
Unfortunately, I had to postpone the implementation of my idea, so I am not sure what needs to be done...