Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Nov 2025 08:10:06 -0800
From:      Rick Macklem <rick.macklem@gmail.com>
To:        Lionel Cons <lionelcons1972@gmail.com>
Cc:        Freebsd hackers list <freebsd-hackers@freebsd.org>
Subject:   Re: NFSv4 server sets/gets FATTR4_HIDDEN, FATTR4_SYSTEM, FATTR4_ARCHIVE attributes from FreeBSD XATTR "user.DOSATTRIB"?
Message-ID:  <CAM5tNy7xbsH5pu48agdphQOm1GHMiNG_t%2BUW2N=w8wFSzbrLWw@mail.gmail.com>
In-Reply-To: <CAPJSo4WVS=AtYVvvYDxgq70PU6dR2neCncnK0HW5nmGXaVAuQQ@mail.gmail.com>
References:  <CAPJSo4WVS=AtYVvvYDxgq70PU6dR2neCncnK0HW5nmGXaVAuQQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Nov 5, 2025 at 6:49=E2=80=AFAM Lionel Cons <lionelcons1972@gmail.co=
m> wrote:
>
> Is it feasibe that the FreeBSD NFSv4 server sets/gets FATTR4_HIDDEN,
> FATTR4_SYSTEM, FATTR4_ARCHIVE attributes from Linux "user.DOSATTRIB"
> XATTR used by SMB/CIFS - except on ZFS, which directly supports these
> attributes.
>
> This is for MacOS, MacOS X and Windows client support.
If FreeBSD, the attributes are handled by chflags ("man 2 chflags") called
UF_HIDDEN, UF_SYSTEM and UF_ARCHIVE.

The NFS server now know about these (added recently) and the file
systems that can be exported and know about them are:
ZFS, UFS, tmpfs and msdosfs
(Full disclosure, for ZFS there is a patch that still needs to be
upstreamed into ZFS for NFS to handle the archive flag over NFS.
This will happen soon.)

As for Samba, I do not know if Samba knows about chflags(2) on
FreeBSD, but if it does not, that is probably how it should handle
these. (Samba is waaayy out of my wheelhouse, so someone else
would need to investigate this.)

To handle them via an extended attribute would be less efficient
than what is done now, since acquiring extended attributes often
involves reading a block they are stored in on the fs.

rick

>
> Lionel
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAM5tNy7xbsH5pu48agdphQOm1GHMiNG_t%2BUW2N=w8wFSzbrLWw>