gocryptfs icon indicating copy to clipboard operation
gocryptfs copied to clipboard

Feature Request: Add the ability to ignore items in the CIPHERDIR

Open chopper2000uk opened this issue 8 years ago • 4 comments

When using a BTRFS subvolume as the CIPHERDIR and snapper to taking regular snapshots, a ".snapshots" directory is created in the root of the subvolume to maintain the snapshots. Similar in part to "MacOS: deal with .DS_Store files inside CIPHERDIR (issue #140)", "OpenDir "": invalid entry ".snapshots": illegal base64 data at input byte 0" is logged. Could a config entry or switch be used to specify items to ignore and cater for ".snapshots" and ".DS_Store" along with other possible scenarios.

chopper2000uk avatar Feb 05 '18 15:02 chopper2000uk

Hmm, even for .DS_Store, the warning will be logged: From https://github.com/rfjakob/gocryptfs/commit/3a5a783b54a913294658041f22066e0618ee91f3 :

With this patch, we log a warning, but otherwise pretend we did not see it.

I think we should always log some information about that. Does it cause other problems for you?

rfjakob avatar Feb 10 '18 10:02 rfjakob

I totally agree with the logging of warnings, and if that is all it is and there are no other implications on having unencrypted data within the cipherdir then all should be fine. Haven't tested it as I wasn't sure if there was going to be any side effect and possible data corruption.

chopper2000uk avatar Feb 10 '18 17:02 chopper2000uk

The only thing is that gocryptfs will return a directory read error if all of the files in the directory were invalid. This is to inform the user that something is wrong.

In your case, this only applies if the directory is empty besides the ".snapshots" directory. As the character "." can never occour in encrypted filenames, there is no risk of a collision, and the directory will not cause any trouble.

rfjakob avatar Feb 10 '18 18:02 rfjakob

Great, in that case all should be fine and no changes needed. Thanks.

chopper2000uk avatar Feb 12 '18 12:02 chopper2000uk