// reference
Extended attributes (xattr)
You put a small note (xattr) on file over the mount. Note shows on the mount and in session. Original file has no note.
Linux uses setfattr / getfattr (package attr). macOS uses xattr.
Linux
setfattr -n user.comment -v testdata ~/pfs-mnt/hello.txt getfattr -n user.comment ~/pfs-mnt/hello.txt getfattr -n user.comment ~/pfs-session/hello.txt getfattr -n user.comment ~/pfs-base/hello.txt setfattr -x user.comment ~/pfs-mnt/hello.txt
macOS
xattr -w comment testdata ~/pfs-mnt/hello.txt xattr -p comment ~/pfs-mnt/hello.txt xattr -p comment ~/pfs-session/hello.txt xattr -p comment ~/pfs-base/hello.txt xattr -d comment ~/pfs-mnt/hello.txt
Mount and session print testdata. Base has no such attribute (xattr: ... No such xattr: comment on macOS, or getfattr error on Linux).
Unmount before next check:
On macOS:
umount ~/pfs-mnt
On Linux:
fusermount3 -u ~/pfs-mnt