# Help with xattrFilter

**URL:** https://forum.syncthing.net/t/help-with-xattrfilter/20499
**Category:** UX
**Created:** [July 8, 2023, 8:29pm UTC](https://forum.syncthing.net/t/help-with-xattrfilter/20499 "2023-07-08T20:29:53Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![cosas](https://forum.syncthing.net/user_avatar/forum.syncthing.net/cosas/32/14159_2.png) [@cosas](https://forum.syncthing.net/u/cosas)
#### Post date: [July 8, 2023, 8:29pm UTC](https://forum.syncthing.net/t/help-with-xattrfilter/20499/1 "2023-07-08T20:29:53Z")

</div>

Hi all

I feel somewhat puzzled with the [feature](https://docs.syncthing.net/advanced/folder-sync-xattrs.html) so I’m reluctant with my translation. Please enlight my questions:

- I think I read it somewhere but I can’t find it back: each rule field allows **coma separated** list isn’t it?
- (not a matter of translation) What is the purpose of fields “Maximum single entry size” & “Maximum total size”? Is it to limit the size(s) of the xattr data themselves or the size(s) of the fields? If they are for the later, why do we need to specify limits if the end of string could do the job? If they are for the former please try to tell some words or link to TFM about the mystery for my general education 😉 (I don’t feel skilled enough with xattr to play/run tests around).
- Now the rough: (I think some examples in the doc like the one we find at [ignore patterns](https://docs.syncthing.net/users/ignoring.html) bottom could have helped me).

 ![01 - no rule default-permit](https://forum-uploads.syncthingcdn.net/original/2X/a/a455a3a03bd1cd788da6e0b497f0e8b10d64962b.png)

If I “Save” the settings as is (above), _all_ local _ext_ended _attr_ibutes **are sent** to the cluster, right? It depends on remote devices to accept or not.

[EDIT]:

 ![02](https://forum-uploads.syncthingcdn.net/original/2X/2/2eadf0d98483698b80c7f65b2c4530083426d85a.png)

Now, just above, _ctime_ **is not** sent (unchecked=deny), _atime_ **is** sent ((explicitly specified + **checked** box)=permit=send). All other xattr (unchecked \*) **are not** sent. Further more, “Deny” being _default_ (to be understood like in netfilter _iptables --policy \<chain\> --jump DROP_ that takes place in the end when all rules have been parsed - I first though the _default_ thing concept applied to each line, which I now guess is wrong), the last line is useless as redundant with current _default_.

Furthermore the first line is useless too for the same reason, unless we want it as a reminder or place holder, or to tweak the second line in the case we also specified _ctime_ here and we don’t want touch it (first match wins).

Right?

[EDIT]:

 ![03](https://forum-uploads.syncthingcdn.net/original/2X/a/a9fd101d2aec4d99305e3920ce17e4376719cbb1.png)

This time (still above), _atime_ **is** sent, _ctime_ is not sent, and all other xattr are sent. Furthermore, _default_ **Deny** being overridden by the “Permit-all-remaining-unmatched-above” last line (\* box checked), the first line is useless, unless we want it as a reminder or place holder, or to tweak the second line in the case we also specified _atime_ here and we don’t want touch it (first match wins).

Right?

---

<div class="post-metadata">

### Author: ![calmh](https://forum.syncthing.net/user_avatar/forum.syncthing.net/calmh/32/15311_2.png) [@calmh](https://forum.syncthing.net/u/calmh)
#### Post date: [July 9, 2023, 7:13am UTC](https://forum.syncthing.net/t/help-with-xattrfilter/20499/2 "2023-07-09T07:13:00Z")

</div>

Let me try to give some answers…

> [@cosas](#):
>
> I think I read it somewhere but I can’t find it back: each rule field allows **coma separated** list isn’t it?

No. In fact, commas are valid as part of extended attribute names, so that would be bad.

> [@cosas](#):
>
> What is the purpose of fields “Maximum single entry size” & “Maximum total size”? Is it to limit the size(s) of the xattr data themselves or the size(s) of the fields?

To limit the size of data. Because this data gets stored in the file metadata (index) and sent around everywhere. So one is effectively a limit on `len(name)+len(value)` (“entry size”) and the other is a limit on the sum of that (“total size”), per file.

(example one) Yes, as it says `default: permit`, everything is sent.

(example two) Yes, I think your reasoning is correct. You’ll note the GUI stopped saying `default: deny` when you added an explicit deny-all at the end.

(example three) Yep.

Except for both the last examples you are filtering an attribute called `atime,user.comment`, which is a possible name on some systems, not anything comma separated.

---

<div class="post-metadata">

### Author: ![cosas](https://forum.syncthing.net/user_avatar/forum.syncthing.net/cosas/32/14159_2.png) [@cosas](https://forum.syncthing.net/u/cosas)
#### Post date: [July 9, 2023, 12:42pm UTC](https://forum.syncthing.net/t/help-with-xattrfilter/20499/3 "2023-07-09T12:42:44Z")

</div>

Thanks for lights Jakob. So as a rule of thumb, a single attribute per line.

---

<div class="post-metadata">

### Author: ![cosas](https://forum.syncthing.net/user_avatar/forum.syncthing.net/cosas/32/14159_2.png) [@cosas](https://forum.syncthing.net/u/cosas)
#### Post date: [July 10, 2023, 2:58pm UTC](https://forum.syncthing.net/t/help-with-xattrfilter/20499/4 "2023-07-10T14:58:00Z")

</div>

And again, many thanks for this jewel Syncthing.
