dedupe fails with EPERM on macOS files with com.apple.provenance xattr
On macOS, `com.apple.provenance` is a system-managed extended attribute that tracks file provenance. Non-root processes cannot set this xattr. Any file that has it will cause `fclones dedupe` to fail when using reflink, because the xattr restore step tries to `set_xattr` on the new file, gets `EPERM`, and rolls back the operation.
This makes reflink deduplication unusable on any directory tree containing files with `com.apple.provenance` unless run as root.
### Example:
```
[2026-03-20 17:43:38.806] fclones: warn: Failed to deduplicate [pathA] -> [pathB]: Failed to clear extended attribute com.apple.provenance of [pathA]: Permission denied (os error 13)
```
### Reproduction
1. Have a file with `com.apple.provenance` set (check with `xattr -l <file>`)
2. Create a duplicate of it
3. Run `fclones group` + `fclones dedupe` on the containing directory
4. Every reflink operation fails with `EPERM`
See also: prior discussion on https://github.com/pkolaczk/fclones/issues/152#issuecomment-1463553695
0 条评论