Skip to content

Feature: Option to pass-through Xattrs (like "com.dropbox.ignored") to the cipher file #948

@SentineI

Description

@SentineI

Hi

Can you please add an option to pass-through all xattrs to the underlying cipher files?

As it currently stands, I am not able to use Gocryptfs without -plaintextnames, because I need to mark certains folders (like __pycache__, .mypy_cache, .git, etc) as not synced by Dropbox (to avoid giving it indigestion & wasting space on stuff I don't need shared).

As far as I can see, Gocryptfs stores xattr encrypted, rather than passing them through:

~$ gocryptfs -version
gocryptfs v2.6.0-4-g33fa0b5 without_openssl; go-fuse v2.8.0; 2025-07-19 go1.22.2 linux/amd64
~$ mkdir TEST_CIPHERDIR TEST_MOUNTPOINT
~$ gocryptfs -init -plaintextnames TEST_CIPHERDIR
Choose a password for protecting your files.
Password: 
Repeat: 

Your master key is:

    XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX-
    XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX

If the gocryptfs.conf file becomes corrupted or you ever forget your password,
there is only one hope for recovery: The master key. Print it to a piece of
paper and store it in a drawer. This message is only printed once.
The gocryptfs filesystem has been created successfully.
You can now mount it using: gocryptfs TEST_CIPHERDIR MOUNTPOINT
~$ gocryptfs TEST_CIPHERDIR TEST_MOUNTPOINT
Password: 
Decrypting master key
DetectQuirks: Btrfs detected, forcing -noprealloc. See https://github.com/rfjakob/gocryptfs/issues/395 for why.
Filesystem mounted and ready.
~$ touch TEST_MOUNTPOINT/{test1,test2}
~$ attr -s com.dropbox.ignored -V 1 TEST_MOUNTPOINT/test1
Attribute "com.dropbox.ignored" set to a 1 byte value for TEST_MOUNTPOINT/test1:
1
~$ attr -g com.dropbox.ignored TEST_MOUNTPOINT/test1
Attribute "com.dropbox.ignored" had a 1 byte value for TEST_MOUNTPOINT/test1:
1
~$ attr -g com.dropbox.ignored TEST_CIPHERDIR/test1
attr_get: No data available
Could not get "com.dropbox.ignored" for TEST_CIPHERDIR/test1
~$ attr -g com.dropbox.ignored TEST_CIPHERDIR/test2
attr_get: No data available
Could not get "com.dropbox.ignored" for TEST_CIPHERDIR/test2
~$ fusermount -u TEST_MOUNTPOINT
~$ rm -rvf TEST_CIPHERDIR TEST_MOUNTPOINT

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions