Skip to content
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

Folder as mount point (in Windows platform) #22

Closed
heX16 opened this issue Jan 31, 2018 · 12 comments
Closed

Folder as mount point (in Windows platform) #22

heX16 opened this issue Jan 31, 2018 · 12 comments

Comments

@heX16
Copy link

heX16 commented Jan 31, 2018

It's possible?
encfs4win can do it. (command: "encfs.exe d:\Data_Crypt\ d:\Data")

@bailey27
Copy link
Owner

It would be possible to support using an empty folder as a mount point. Dokany supports this.

I think it would require mostly user interface changes.

@bailey27
Copy link
Owner

bailey27 commented Feb 6, 2018

It's working.

There is one limitation though. I currently can't allow mounting reverse-mode filesystems to an empty folder. They have to be mounted to a drive letter. Only forward (normal) mode filesystems can be mounted to a an empty folder.

The reason is that when you mount a filesystem to an empty folder, the filenames get converted to all uppercase most of the time. I've debugged this some, and it appears that it is being done upstream of Dokany. I don't know why this happens.

Reverse mode does not work in case-insensitive mode because the file names would all be lost if whatever was archiving the encrypted files didn't preserve the case of the file names. If the case of the encrypted file names is changed, then they'll base64 decode to gibberish instead of to the encrypted filename data.

Is this limitation a problem for you?

I plan to make a new release in the next couple of days anyway, but I'd like to know if you or anyone else is unhappy with this limitation. I could continue debugging and see if there is a solution.

@bailey27
Copy link
Owner

bailey27 commented Feb 7, 2018

cppcryptfs 1.4.0.10 has been released https://github.com/bailey27/cppcryptfs/releases/tag/1.4.0.10

It allows mounting filesystems to empty NTFS folders in forward (normal) mode.

@heX16
Copy link
Author

heX16 commented Feb 7, 2018

The reason is that when you mount a filesystem to an empty folder, the filenames get converted to all uppercase most of the time.

I found a description of this problem:
winfsp/winfsp#36 (comment)
This is problem on Windows. It is difficult to solve this problem.

Direct mode - this is more than enough. I think few people use the reversible mode.
Many thanks!

PS Sorry for my English.

@bailey27
Copy link
Owner

bailey27 commented Feb 8, 2018

I want to point out that currently the empty folder mount point must be added in the UI (by right-clicking on the list of drive letters on the mount tab and doing "Add Mount Point") before it can be used, even if you are mounting using the command line.

In other words, I noticed that mounting using the command line fails unless that mount point has already been added in the UI.

I'll fix this soon.

@heX16
Copy link
Author

heX16 commented Feb 13, 2018

All work, thanks! I install Dokan Library 1.1.0.2000 (x64).


OLD BAD REPORT:

OS: Windows 7 x64.
Cmd "ver": Microsoft Windows [Version 6.1.7601]
Dokan: 1.0.3.1000 - incorrect version!
CryptFS version: 1.4.0.10

Crash immediately when mounting - because i using incorrect Dokan version!

default

Folder "D:\heXor\Crypted" contain 2 file: gocryptfs.conf, gocryptfs.diriv.

Cmd "dir":

D:\heXor>dir
 Том в устройстве D не имеет метки.
 Серийный номер тома: 0453-A3F4

 Содержимое папки D:\heXor

13.02.2018  09:27    <DIR>          .
13.02.2018  09:27    <DIR>          ..
13.02.2018  09:27    <JUNCTION>     Crypt [\??\Volume{d6cc17c5-1736-4085-bce7-964f1e9f5de9}\]
13.02.2018  09:25    <DIR>          Crypted
...

D:\heXor\Crypted>dir
 Том в устройстве D не имеет метки.
 Серийный номер тома: 0453-A3F4

 Содержимое папки D:\heXor\Crypted

13.02.2018  09:25    <DIR>          .
13.02.2018  09:25    <DIR>          ..
13.02.2018  09:24               409 gocryptfs.conf
13.02.2018  09:24                16 gocryptfs.diriv
               2 файлов            425 байт
               2 папок  429 880 901 632 байт свободно

@bailey27
Copy link
Owner

Thanks for reporting this.

The Windows dynamic linker complains with an error dialog if you run old cppcryptfs (1.4.0.7 or before) with new dokany (1.10.x) and refuses to let it run, but it doesn't complain if you run new cppcryptfs with old dokany (1.0.x), and cppcryptfs crashes like you saw.

I'll put a in check for the Dokany version to make sure it's 1.10 or greater.

@bailey27
Copy link
Owner

The 1.4.0.11 has been released. It doesn't require the mount point folder to be pre-configured in the ui if you're mounting from the command line.

It also checks the Dokany version to make sure it's compatible.

@twocoolbeans
Copy link

If find a solution to mounting a reverse volume to an empty folder that would be great. See referenced issue with gocryptfs. Thanks for your work on cppcryptfs. First looked at when more than just binary and Dokany driver was required.

@bailey27
Copy link
Owner

bailey27 commented Jun 2, 2018

The reason for not supporting mounting reverse mode filesystems to an empty folder is purely a Windows issue. It isn't related to AES-SIV mode.

@twocoolbeans
Copy link

Huge proponent of keeping code simple but originally thought a better option/ solution might be a "Syncthing" command line option on gocryptfs side to add a ".stfolder" to a read-only reverse volume. Hence the reference but have since changed mind.

@bailey27
Copy link
Owner

The restriction on using an empty NTFS directory as a mount point in reverse mode has been removed in cppcryptfs 1.4.0.19

https://github.com/bailey27/cppcryptfs/releases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants