🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: muc.lists.freebsd.hackers
Article #7

Re: [Ms-nfs41-client-devel] FreeBSD-16.0-CURRENT-amd64-20260224: NFSv4.2 on Windows: mkdir fails, touch works

#7
From: Dan Shelton
Date: Thu, 08 Oct 2026 23:23
154 lines
11965 bytes
On Tue, 24 Mar 2026 at 04:43, Rick Macklem <rick.macklem@gmail.com> wrote:
>
> On Mon, Mar 23, 2026 at 7:56 PM Dan Shelton <dan.f.shelton@gmail.com> wrote:
> >
> > On Tue, 17 Mar 2026 at 01:29, Rick Macklem <rick.macklem@gmail.com> wrote:
> > >
> > > On Mon, Mar 16, 2026 at 3:23 PM Dan Shelton <dan.f.shelton@gmail.com> wrote:
> > > >
> > > > On Thu, 12 Mar 2026 at 00:20, Rick Macklem <rick.macklem@gmail.com> wrote:
> > > > >
> > > > > On Mon, Mar 9, 2026 at 4:36 PM Rick Macklem <rick.macklem@gmail.com> wrote:
> > > > > >
> > > > > > On Mon, Mar 9, 2026 at 9:43 AM Roland Mainz <roland.mainz@nrubsig.org> wrote:
> > > > > > >
> > > > > > > On Sat, Mar 7, 2026 at 10:28 PM Rick Macklem <rick.macklem@gmail.com> wrote:
> > > > > > > >
> > > > > > > > On Sat, Mar 7, 2026 at 9:27 AM Dan Shelton <dan.f.shelton@gmail.com> wrote:
> > > > > > > > >
> > > > > > > > > Hello,
> > > > > > > > >
> > > > > > > > > some odd issue with FreeBSD 16.0-CURRENT main-n284403-895a97c875a0
> > > > > > > > > (installed from
> > > > > > > > > FreeBSD-16.0-CURRENT-amd64-20260224-16822dac32ab-284159-disc1.iso) and
> > > > > > > > > ms-nfs41-client:
> > > > > > > > > $ /sbin/nfs_mount -o rw 'F:' 'nfs://42.28.16.228//nfsdata'
> > > > > > > > > Successfully mounted '42.28.16.228@NFS@2049' to drive 'F:'
> > > > > > > > > $ cd /cygdrive/f/dsheldon/tmp/freebsdtests
> > > > > > > > >
> > > > > > > > > $ touch x
> > > > > > > > > $ mkdir y_dir
> > > > > > > > > mkdir: cannot create directory ‘y_dir’: Permission denied
> > > > > > > > >
> > > > > > > > > I tried this:
> > > > > > > > > $ chmod a+rwx .
> > > > > > > > > $ mkdir y_dir
> > > > > > > > > mkdir: cannot create directory ‘y_dir’: Permission denied
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > No ACLs involved.
> > > > > > > > > The same setup works with FreeBSD 15.0.
> > > > > > > > >
> > > > > > > > > How can I debug this, or is this a known issue?
> > > > > > > > Hmm. I don't think anything has changed for mkdir between
> > > > > > > > 15.0 and man/16 in the NFS server code.
> > > > > > Yep, the change was that FreeBSD16 supports Archive, but didn't
> > > > > > handle setting it when doing a CREATE operation.
> > > > > >
> > > > > > > >
> > > > > > > > - If the mkdir request (actually MKNOD in NFSv4) specifies
> > > > > > > >   an owner or owner_group, the permissions are checked as follows:
> > > > > > > >   - For setting owner to anything other than the uid of the caller in
> > > > > > > >     the RPC request's credentials, the caller must be root and the
> > > > > > > >     file system exported -maproot=root.
> > > > > > > >  - For setting an owner_group, the gid owner_group maps to must
> > > > > > > >    be in the gid list of the RPC's credentials.
> > > > > > > >
> > > > > > > > I'd suggest you capture packets when the mkdir fails and then..
> > > > > > > > - Either look at them in wireshark yourself and see what attributes
> > > > > > > >   are being set by the operation. In particular, check for any ACL
> > > > > > > >   being specified (I know you said ACLs are not involved, but..)
> > > > > > > >   along with OWNER and OWNER_GROUP.
> > > > > > > > or
> > > > > > > > - Make the packet capture available to me and I'll look at it.
> > > > > > > >
> > > > > > > > I suspect the NFS4ERR_PERM is being generated because of
> > > > > > > > the attributes being set by the MKNOD operation and I suspect
> > > > > > > > there is some difference between how you have 15.0 configured
> > > > > > > > and main/16 configured.
> > > > > > > [snip]
> > > > > > >
> > > > > > > It seems to be an issue with |FATTR4_ARCHIVE| ... I filed
> > > > > > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293691 ("NFSv4.1
> > > > > > > client trying to set |FATTR4_ARCHIVE| gets EPERM for file/dir creation
> > > > > > > attempts") for this, and added
> > > > > > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292283 ("Bug 292283
> > > > > > > - (JAVA) NFSv4.1 client trying to set FATTR4_SYSTEM or FATTR4_HIDDEN
> > > > > > > gets EPERM for file and dir creation attemps") as reference since the
> > > > > > > same kind of workaround seems to work.
> > > > > > >
> > > > > > > Next release for ms-nfs41-client includes a workaround (see
> > > > > > > https://github.com/kofemann/ms-nfs41-client/commit/7156d9f9deb25843e57fd455d8ec67951b82c737)
> > > > > > > which should avoid this bug, but I will remove that workaround as soon
> > > > > > > as a fixed release version of FreeBSD will become available...
> > > > > > I've put a patch on this FreeBSD PR and am attaching it here.
> > > > > Dan, can you test the patch and let us know if it works for you?
> > > >
> > > > https://bz-attachments.freebsd.org/attachment.cgi?id=268667 works, and
> > > > fixes the bug.
> > > >
> > > > Could you send a comment around when the next iso for FreeBSD
> > > > 16.0-CURRENT comes out with that bugfix, please?
> > > The patch is now committed to main/16.0-current, so any snapshot
> > > generated after to-day should have it.
> > > (They are typically generated once per week on Thursdays.)
> >
> > Is this fix included in
> > https://download.freebsd.org/snapshots/ISO-IMAGES/16.0/FreeBSD-16.0-CURRENT-amd64-20260316-e6083790f217-284522-disc1.iso
> Don't know. If you look, I posted on Mar. 17 at 01:29 and the date on
> this one is Mar 16 (look for 20260316 in the name).
>
> So, I doubt it, but it might have made it into it, rick

It seems to have been fixed for a while.

@Roland Mainz Can
WORKAROUND_FOR_FREEBSD_CREATIONFAILSWITHEPERM_BUGS_292283_293691 be
disabled now in
https://github.com/kofemann/ms-nfs41-client/blob/master/nfs41_build_features.h?
FreeBSD 15.1 is out, and FreeBSD16 with the other fix is out too.

Dan
-- 
Dan Shelton - Cluster Specialist Win/Lin/Bsd


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
Technical Details
Message-ID: <CAAvCNcCwTFg8ESDBcTxDhX9K5ZF13o89qgvmPN9UQ2UCyH-c1w@mail.gmail.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!3.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.space.net!news.muc.de!.POSTED.news.muc.de!not-for-mail
References: <CAM5tNy54bwp9CyH4huG_4bMZM612ZfF0Y_qwUL2oNR3CtGsVyQ@mail.gmail.com> <>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!3.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.space.net!news.muc.de!.POSTED.news.muc.de!not-for-mail
From: Dan Shelton <dan.f.shelton@gmail.com>
Newsgroups: muc.lists.freebsd.hackers
Subject: Re: [Ms-nfs41-client-devel] FreeBSD-16.0-CURRENT-amd64-20260224:
 NFSv4.2 on Windows: mkdir fails, touch works
Date: Fri, 9 Oct 2026 01:23:25 +0200
Organization: Newsgate at muc.de e.V.
Sender: owner-freebsd-hackers@FreeBSD.org
Approved: news-admin@muc.de
Distribution: world
Message-ID: <CAAvCNcCwTFg8ESDBcTxDhX9K5ZF13o89qgvmPN9UQ2UCyH-c1w@mail.gmail.com>
References: <CAM5tNy54bwp9CyH4huG_4bMZM612ZfF0Y_qwUL2oNR3CtGsVyQ@mail.gmail.com> <>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: news.muc.de; posting-host="news.muc.de:193.149.48.2";
	logging-data="13498"; mail-complaints-to="news-admin@muc.de"
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1791501847; h=from:from:sender:sender:reply-to:subject:subject:date:date:
	 message-id:message-id:to:to:cc:mime-version:mime-version:
	 content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding:
	 in-reply-to:in-reply-to:references:references:list-id:list-help:
	 list-owner:list-unsubscribe:list-subscribe:list-post;
	bh=LXO/KIvTj1N2Hd/PWVAUb67toTQjKk+iIAvF4kRpdnc=;
	b=oxw1QNGTbFUQpKDbGlxCgxyz+CV0L1K16dzXBsYsYGykONem0T1tldfQAKYXXdNs2viWIA
	FZEhAWS5EX9FUK5CPO14zN3ZrnDo2jFR74qm/NeXFziTAxd7nj+qL25vOE1Pr3BxHiKG55
	erh48uBghxPiJxQQGg873teMZK2DKRT3wwdKNfgvEoKaZTUYiu0Sj0aBcGczb1eaHQfAyR
	VhJIsXGRGPjqvKcJj0rZj1YDWFxAgpS+Wp6foHr62gUqRZHMq8PNPfZEPLe+E4wiPsuToS
	8x3qAt/rhSgNm4NAG8+5xssLw0TAA4oSiPq9nrGMV5CbYjfl2tDvh8w8ICVOFQ==
X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org
Authentication-Results: mx1.freebsd.org;
	dkim=pass header.d=gmail.com header.s=20251104 header.b=DEDj5Ozi;
	arc=pass ("google.com:s=arc-20260327:i=1");
	spf=pass (mx1.freebsd.org: domain of dan.f.shelton@gmail.com designates 2a00:1450:4864:20::536 as permitted sender) smtp.mailfrom=dan.f.shelton@gmail.com;
	dmarc=pass (policy=none) header.from=gmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20251104; t=1791501842; x=1792106642; darn=freebsd.org;
        h=content-transfer-encoding:content-type:to:subject:message-id:date
         :from:in-reply-to:references:mime-version:from:to:cc:subject:date
         :message-id:reply-to:content-type;
        bh=LXO/KIvTj1N2Hd/PWVAUb67toTQjKk+iIAvF4kRpdnc=;
        b=DEDj5OziJMMXd486I9DgQJXzwIUbV8qbAfQ7gS4gsq8JlMdokUqWp44XkDx2c2hLL7
         qvZGQ/yvHuoLWUSle5LZiPJ3o3q7iVNS8th5HyUH+gbIJuLNNdckCLADTIeFo9VGrhSx
         4GfPryqNH0xUZnT3ywQaCABo4rv4o/vI0CWIlGZxInQuwjyhp3HtnsXzckW2wA6ejY3K
         rgFvJX6vas53vizRsow/ooZAKuhx0yA2zd2yIUCJQXNiMXNSR3bNvrpDMN5oyEqITlsc
         5JKTXukF2KNhrJf6Q/TCX+uPloOqX9/HVTvpqXyfx7j+0R3XNjzJMps+hZzhwcRXC6yT
         eUzw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1791501842; x=1792106642;
        h=content-transfer-encoding:content-type:to:subject:message-id:date
         :from:in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state
         :from:to:cc:subject:date:message-id:reply-to:content-type;
        bh=LXO/KIvTj1N2Hd/PWVAUb67toTQjKk+iIAvF4kRpdnc=;
        b=xfxvR5QjooDCKdn8bFQ3sRC/Y3c2jgYzi3x1FZ/fFCtXoFfWsKON9r7sB0asreRfdI
         kTGimIw72BwdTKKYuEiaJav1XApgAH4vQn3BPxVkzW2u6pOrk0NNZ52dzWMoFmkq1XeD
         Z09saSUDGGJgBvJ0jy8imqi/4+lyjw/raTgFYt0Ua8mLxx7W9kwI/JacreqOAfT2+cuX
         vlFaL17Z/Q6S2ngpNt0MDbbQdW1KI5RoJ67AZ2ArOtjZewzzeMtTPG2kVQ3Bgqkza+P2
         5VuMiMXbV0KqWFrAgG7ne05xC/f0DbEpTDYB4upz4qWG6AXmQ9IxJgsguUZwlQwyLLKc
         puxw==
X-Gm-Message-State: AFq9FYJ+3TQ1R9gBEUjlXTW6pPzta0Z5zQG6HAOg6ydZ5hj5QfB2CrnI
	Y0Pw+e6/C1aYQZDMhudJlJ2UR9vRpp0PtSeHqQ5VKej83wMc5Ts+pZmTCeKzHBGkae20XHOLmvR
	xOZqidFqi574szxNp+1en4Tryn+6+FcX/fKi6
X-Gm-Gg: AYBFou1Vw6s+91K17LEe1SNQxv1QxXw3d9mnWhe61LEYFM0N0PH1bMP5VTF383DjOBu
	hRQ4Y10SOJePxgL1GMu9JhaH8lrbNW+joaSebft6iAwdP2xMfNsG+bLQ/+0t77K//0Zq+M0ZtmF
	4AxQmpiDOXl9hCpr5ef16Rj3DgwaWjOgwzxr5FN1TtLypxo683tJgmsRM5Y254eWcVSWyLUenrG
	5U500NFuGeUTVAWlPiT7nJbWj6dKeRhf1+It7ptrRgpBX2bQt+bdT6LTuHkFmvNyBjtWlPa08Gu
	ZbUYGONOPoSXp8rOXeKsfMnmSpx5nKkFhonEPyeE/xtwYP5k8geDf6VmTw==
Precedence: list
In-Reply-To: <CAM5tNy54bwp9CyH4huG_4bMZM612ZfF0Y_qwUL2oNR3CtGsVyQ@mail.gmail.com>
X-Gm-Features: AclHuK96b2k-fp_gEnoHBWpzRzq9_n6I9DNoNoHbkGKmAT7S_o5nteQbpDum57U
X-Spamd-Bar: --
X-Spamd-Result: default: False [-2.00 / 15.00];
	ARC_ALLOW(-1.00)[google.com:s=arc-20260327:i=1];
	DMARC_POLICY_ALLOW(-0.50)[gmail.com,none];
	R_DKIM_ALLOW(-0.20)[gmail.com:s=20251104];
	R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4864::/56];
	MIME_GOOD(-0.10)[text/plain];
	ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US];
	RCVD_COUNT_ONE(0.00)[1];
	MISSING_XM_UA(0.00)[];
	DWL_DNSWL_NONE(0.00)[gmail.com:dkim];
	MIME_TRACE(0.00)[0:+];
	FREEMAIL_ENVFROM(0.00)[gmail.com];
	FREEMAIL_FROM(0.00)[gmail.com];
	MID_RHS_MATCH_FROMTLD(0.00)[];
	RCPT_COUNT_TWO(0.00)[2];
	MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org];
	TO_DN_NONE(0.00)[];
	FROM_EQ_ENVFROM(0.00)[];
	FROM_HAS_DN(0.00)[];
	RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::536:from];
	TO_MATCH_ENVRCPT_SOME(0.00)[];
	RCVD_TLS_LAST(0.00)[];
	PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org];
	ALIAS_RESOLVED(0.00)[];
	DKIM_TRACE(0.00)[gmail.com:+]
X-Rspamd-Queue-Id: 4j15fY0j68z4FF4
X-Newsgate-Id: f02c70b8849f+
X-No-Archive: Yes