jetwhiz / encfs4win

Windows port of EncFS
https://encfs.win
Other
400 stars 41 forks source link

request: mount as read-only #65

Closed Owyn closed 5 years ago

Owyn commented 7 years ago

It'd be very useful for --reverse mode in cloud usage scenario cuz those things always seem to mess files up

It should be very easy to implement as a flag then just few checks in write\delete\create for file\dir functions

many encryption softwares has this option, truecrypt for example could mount as read-only

jetwhiz commented 7 years ago

Hi @Owyn -- the file system should be read only in reverse mode unless you have "per-file initialization vectors" disabled (as per https://github.com/vgough/encfs/commit/cd89e60ff26977d9b946bbcb6be15a754b0904c7 upstream)

Is reverse mode still writable for you even with per-file IV enabled?

Owyn commented 7 years ago

Yes, I have it disabled cuz I have null encryption for filenames (cuz I have many sub-subfolders)

jetwhiz commented 7 years ago

It might be a good addition to have a --readonly option for mounting in general! I will see what I can do and work with the encfs project upstream to see if they like the idea.

leochou0729 commented 7 years ago

Hello, On MacOS, I can use "-- -o rdonly" option to mount encfs drive as read only, but it doesn't have any effect on Windows. Adding a "--readonly" option in source code like --reverse also didn't work. I have no idea what's the problem. Can anyone help? @jetwhiz

jetwhiz commented 7 years ago

Hi @leochou0729

It is possible that both the readonly option (from --reverse) and the -r rdonly FUSE flag need to be set for this to work. Can you tell if this helps the issue?

leochou0729 commented 7 years ago

@jetwhiz Sorry for the late reply. I set both flags, but it doesn't work. The drive is still writable.

leochou0729 commented 7 years ago

I can use "-o rdonly" with OSXFUSE to make encfs drive non-writable on MacOS. I'm not sure if it is a bug in Dokan.

jetwhiz commented 7 years ago

It's possible that Dokan doesn't support this, but I haven't been able to confirm for certain. When using the Dokan sample fuse program (sample\fuse_mirror\mirror.exe), rdonly isn't listed as an option. When you supply it, the folder is not read only.

Can you confirm this on your side?

leochou0729 commented 6 years ago

Hi @jetwhiz , I've tried mirror.exe. With /w option, I can mount the virtual drive as read only.

leochou0729 commented 6 years ago

I noticed fuse mirror doesn't support read-only mode but mirror has a /w option.

jetwhiz commented 6 years ago

Hi @leochou0729 -- the mirror should work correctly since it is Dokany itself, but I have not yet found a way to make the FUSE portion of Dokany (which we're using) work in read-only mode. I will have to check with @Liryna to see for sure.

leochou0729 commented 6 years ago

I just made a PR. Thanks, @jetwhiz.

jetwhiz commented 5 years ago

Hi @leochou0729

It appears that read-only mode is working for me now with the latest encfs4win ... can you confirm? You can enable it by using the Dokany read-only flag: "-o -r", for example:

encfs.exe C:/path/to/my/folder Z: -o -r

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.