-
Notifications
You must be signed in to change notification settings - Fork 521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EncFS build with WinFsp / Cygwin FUSE #152
Comments
So unfortunately, I'm facing the following issue : I found quite a similar issue with the build of s3fs (#143). EncFS uses Thus I'm not sure we have something that checks mountpoint we could modify to make WinFsp-FUSE happy... Any clue ? Thank you very much ! Ben |
WinFsp FUSE requires that the drive/directory does not exist when mounting. Please see FAQ entry 2 under "FUSE": https://github.com/billziss-gh/winfsp/wiki/Frequently-Asked-Questions#fuse |
Sorry, I'm confused, I should have red the FAQ... Some issues though with |
Try mounting on a drive using the mountpoint When mounting on a directory Windows expects the file system to be case-insensitive. If it is not multiple problems ensue. |
@billziss-gh, thank you, it helped 👍 |
(By crash I am assuming that only the file system process crashes and not the whole OS, otherwise this is a very serious bug.) This is by design. WinFsp uses zero-copy techniques where it may map the write buffer in the address spaces of both the originating process (the process that issued the WRITE) and the file system process. For this reason it disallows writing into the WRITE buffer by marking the pages READ-ONLY. BTW, note that the |
I think so too @billziss-gh ! Thank you for your explanation, it confirms what I discovered 👍 |
OK, I now have a bug deleting files. Unfortunately, deleting a file constantly fails on the above check. Does it means that a file being deleted on Windows is inevitably opened ? Sounds like I encounter quite similar behavior renaming, is a file opened before it is being renamed ? Thank you 👍 |
Unfortunately this is indeed the case in Windows. While in POSIX there are distinct namespace operations (like However I am surprised the EncFS has the limitation you described. It looks like you would have to modify it to remove it or relax it. |
Thank you for your confirming this in details @billziss-gh 👍 EncFS assumes a file should not be opened before being deleted. Otherwise,
Well workaround is easy then, just verify that the file is opened only once. it's a little bit more tricky with |
I am curious. Why does EncFS care if a file is open or not? POSIX file systems rarely do. |
EncFS has for example an auto-unmount-after-inactivity function, which then unmounts only if there is no remaining opened file. |
Thanks. |
So, after some patches, EncFS now works pretty good. Before digging into performance testing, I have this remaining "bug" : And a tiny question, is Thank you ! |
That is indeed weird. Try to mount as You should use Another likely reason is that EncFS reports
Yes, there are is no |
I use I just discovered that a first |
Fair enough :)
By default drives created by WinFsp are accessible and they do not need
I am suspecting that you may have to change how EncFS handles Your screenshot appears to show Cygwin responding to |
Yes this is how the mount point |
EncFS may return Other finding, even if I set Thank you 👍 |
I would have thought that In any case this is something that should be relatively easy to add.
This may indeed be a bug. |
EncFS returns this specific code when authentication of decoded data fails (when data is corrupted, even perhaps intentionally by a bad person). This allows to quickly identify an issue with data decoding, whereas the default
Should I open a bug to keep track of this ? |
I believe I any case WinFsp should not really have an opinion on what error codes FUSE file systems return, so I agree that we should add
You can open bugs for them of course, although I would prefer PR's even more ;-) |
Thinking again about |
|
I close this now, the PR to support EncFS on Cygwin is almost ready : I will open individual issues for the remaining (non-blocking) findings. Bill, thank you very much for you really nice support here 👍 Edit : PR merged to EncFS master, EncFS 1.9.5 will be Cygwin ready. |
No problem. Glad to be of help. |
Shouldn't there be a binary release of encfs for windows? Asking windows users to build themselves is simply not practical. |
@mhogomchungu please open an issue directly in Encfs repository ? |
@billziss-gh you can add EncFS to the list, v1.9.5 which supports Cygwin has just been released 👍 |
🎉 🎉 🎉 @benrubson congratulations! Will add it ASAP. |
Many thanks Bill 👍 🎉 |
Almost a year later and I found this. It's not clear how to set this up @benrubson . Is it possible with a native build or is cygwin required? If so, how do yo use it? It looks like WSL doesn't support FUSE yet, so I assume that's out for now. |
@ScottRFrost follow the wiki ? |
Hi,
EncFS provides an encrypted filesystem in user-space, using FUSE library.
https://github.com/vgough/encfs
Perfect, let's then give it a try using WinFsp and its Cygwin FUSE compatibility layer !
Fresh new install of Cygwin64 on a Windows 2012 R2 Server.
With following required packages :
cmake
make
gcc-g++
gettext-devel
openssl-devel
procps-ng
Install WinFsp FUSE into Cygwin :
cd /cygdrive/c/Program*/WinFsp/opt/cygfuse
sh install.sh
In
/usr/include/fuse/winfsp_fuse.h
, modify :void *cygwin_create_path
To :
char *cygwin_create_path
Get last EncFS version :
https://github.com/vgough/encfs/releases
(encfs-1.9.4.tar.gz at time of writing)
Uncompress the archive and enter the project directory.
In
CMakeLists.txt
, modify :-DFUSE_USE_VERSION=29
To :
-DFUSE_USE_VERSION=29 -DCYGFUSE
And manual build :
https://github.com/vgough/encfs/blob/master/INSTALL.md
mkdir build
cd build
cmake ..
make
Let's then test :
mkdir /tmp/enc /tmp/dec
./encfs --standard --extpass="echo test" /tmp/enc /tmp/dec
The text was updated successfully, but these errors were encountered: