Skip to content

Navigation Menu

Sign in
Sign up

Feature: Allow shadowing cipherdir with mountpoint #718

Atrate started this conversation in Ideas & Feature requests
Discussion options

It would be nice if gocryptfs allowed shadowing the cipherdir with its decrypted mountpoint, like ecryptfs.

I am not knowledgeable enough as to whether FUSE supports it or whether it's possible to do without superuser rights/a kernel module, so I'm just throwing the idea here.

Current behavior:

> gocryptfs /tmp/tmp.2CrICJxW7V/test /tmp/tmp.2CrICJxW7V/test
Mountpoint "/tmp/tmp.2CrICJxW7V/test" would shadow cipherdir "/tmp/tmp.2CrICJxW7V/test", this is not supported
You must be logged in to vote

Replies: 2 comments 7 replies

Comment options

Hi, this is theoretically possible, but isn't it just super confusing?

You must be logged in to vote
4 replies
Comment options

I guess I just got used to the way ecryptfs allows it and it became convenient for me to not have to keep track of two separate directories.

Comment options

On the contrary, it makes a lot of sense (from an end-user perspective) to point gocryptfs at a directory in order decrypt it, or unlock it, without having to look in another place to view the decrypted content.

I wrote a wrapper script that just takes CIPHERDIR as an argument, renames it to .CIPHERDIR (hidden folder) and then mounts it on CIPHERDIR after recreating the folder. And does the reverse when CIPHERDIR is already a fuse.gocryptfs mountpoint. The resulting experience feels very natural.

Just like some apps or operating systems offer a "locked folder" for your most sensitive files, that you gain access to only after authenticating upon opening it; the "unlocking the vault" experience.

Comment options

Doesn't this create the risk of a user saving unencrypted files into CIPHERDIR?

Comment options

For forward mode, since the CIPHERDIR is now the new mountpoint saving unencrypted files will encrypt the files to the .CIPHERDIR. After unmounting revert the changes we made initially that is remove the mountpoint (CIPHERDIR) and rename the .CIPHERDIR to CIPHERDIR

Comment options

I’m facing the same requirement of enabling a shadow mount for a cipher directory. I tried temporarily bypassing the shadow mount check mentioned above, but that resulted in numerous panics.

I’d like to better understand the complexity involved in properly supporting this feature.

You must be logged in to vote
3 replies
Comment options

You'd just need to chdir into CIPHERDIR before mounting and then use relative paths everywhere

Comment options

Thanks for the reply, if I understand correctly do you mean something

  1. First cd CIPHERDIR
  2. Then run gocryptfs . ../CIPHERDIR
    Please let me know if this a right approach or would this require changes in the codebase?
Comment options

This needs code changes (a lot of code changes)

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

This discussion was converted from issue #716 on March 08, 2023 16:55.

AltStyle によって変換されたページ (->オリジナル) /