Re: FreeBSD API to atomically create a file with an ACL in one step? Re: Does FreeBSD NFSv4 server support FATTR4_ACL at file and directory creation time?

From: Rick Macklem <rick.macklem_at_gmail.com>
Date: Sun, 16 Nov 2025 12:58:26 UTC
On Sat, Nov 15, 2025 at 4:18 PM Rick Macklem <rick.macklem@gmail.com> wrote:
>
> On Sat, Nov 15, 2025 at 5:01 AM Aurélien Couderc
> <aurelien.couderc2002@gmail.com> wrote:
> >
> > On Thu, Nov 13, 2025 at 2:33 PM Rick Macklem <rick.macklem@gmail.com> wrote:
> > >
> > > On Thu, Nov 13, 2025 at 5:31 AM Rick Macklem <rick.macklem@gmail.com> wrote:
> > > >
> > > > On Thu, Nov 13, 2025 at 1:10 AM Aurélien Couderc
> > > > <aurelien.couderc2002@gmail.com> wrote:
> > > > >
> > > > > Does FreeBSD NFSv4 server support FATTR4_ACL at file and directory
> > > > > creation time?
> > > > Yes, it should, although I have no idea when it was tested.
> > > > If you find it does not do so, please submit a bugzilla bug
> > > > report.
> > > Oh, and assuming the server's exported fs supports NFSv4 ACLs.
> >
> > Followup quesion:
> > Does FreeBSD have an API to atomically create a file with an ACL in one step?
> Nope. A POSIX open(2) does not have an ACL argument, so the only time an ACL
> is applied to a file when it is created is by inheritance.
Oh, I should note that, by default, there will be an ACL based
on the POSIX mode bits, using the Sun algorithm (in PSARC029 I think?)
that puts the deny ACEs at the beginning of the NFSv4 ACL.

rick

>
> rick
>
> >
> > Aurélien
> > --
> > Aurélien Couderc <aurelien.couderc2002@gmail.com>
> > Big Data/Data mining expert, chess enthusiast
> >