🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

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

#8
From: Lionel Cons
Date: Fri, 09 Oct 2026 07:02
165 lines
12454 bytes
On Fri, 9 Oct 2026 at 01:24, Dan Shelton <dan.f.shelton@gmail.com> wrote:
>
> 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.

NFSv4.1 was first useful with FreeBSD 13.1, read:
https://www.freebsd.org/releases/13.1R/relnotes/).

Question is, would removing
WORKAROUND_FOR_FREEBSD_CREATIONFAILSWITHEPERM_BUGS_292283_293691 lock
anyone using a FreeBSD version older than 15.1 out?

Lionel


--
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: <CAPJSo4WsZi31UZPWE9i=_L=PKFo_vmOE_AUDn0PXaVODhjDvGw@mail.gmail.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!2.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: <CAAvCNcCwTFg8ESDBcTxDhX9K5ZF13o89qgvmPN9UQ2UCyH-c1w@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!2.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: Lionel Cons <lionelcons1972@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 09:02:00 +0200
Organization: Newsgate at muc.de e.V.
Sender: owner-freebsd-hackers@FreeBSD.org
Approved: news-admin@muc.de
Distribution: world
Message-ID: <CAPJSo4WsZi31UZPWE9i=_L=PKFo_vmOE_AUDn0PXaVODhjDvGw@mail.gmail.com>
References: <CAAvCNcCwTFg8ESDBcTxDhX9K5ZF13o89qgvmPN9UQ2UCyH-c1w@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="89737"; mail-complaints-to="news-admin@muc.de"
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1791529439; 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=YXS5QMun8sm5nvRRqIK7IxbQxFph57KG9hsV8Dfo4po=;
	b=VtpXacRGK/zqezczM8zKwGgxiE9L5t/xOkKtcv+TfX8TNTJCEdOCqCZVEMVoIJss6qwanb
	Tr/Wjz6zv3DzVTDf2yTBwBOO5xJ6mP2z1aJfGz7Z2BA0I/7uzvlczJBndznlF4+jWW+85j
	7jgpCZRcgd2YojfaPcKj5mjmq1OWNbqfqrNbmhyuLECzGxGT7RUSj2lK05CeTMiC6W2Zk4
	9R70LFooR4nSEk92zjuYDsIJ7wYCT4A6s+d+oNve1S+N9reQZXW+45SItly+i3Neruofct
	o3d+eWGHYoC98P36gZO0ie2o5xkqXT1SBibru9xwwU6V+suVJKnThWxfbSipAg==
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=NauH+H9v;
	arc=pass ("google.com:s=arc-20260327:i=1");
	spf=pass (mx1.freebsd.org: domain of lionelcons1972@gmail.com designates 2a00:1450:4864:20::531 as permitted sender) smtp.mailfrom=lionelcons1972@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=1791529432; x=1792134232; 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=YXS5QMun8sm5nvRRqIK7IxbQxFph57KG9hsV8Dfo4po=;
        b=NauH+H9vyNFtgS2ha5oYlSZJXd1p6EFKUAs1iVAC/c5rwxEN8w3iEUiIjX7X4fHX70
         KLtSwAL/8yWiWXF8iTw+UcYy9r0CuesS1VZNemzei4YEVa9NeYY3OgB8zFTBy/MNnWb1
         PdYvEJrQWUJ/re7TdkcLZassD6vVmdx61Oo/len9hzrLu8QHT9XpHmWxd/I2Qnm1ISKv
         WmgzkJIz2be3k9FYLlocBTUE9l6/MHNtWLcdaixIBP0A/2QlI8UuDIcuQcBia9SS1LiW
         2eY0FdgXYz9kl1Qn6xGQiAFY7mfgys4n27zyABmCNOpsP1EsZKzCZyFddCAGvnsvUEUt
         H5sg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1791529432; x=1792134232;
        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=YXS5QMun8sm5nvRRqIK7IxbQxFph57KG9hsV8Dfo4po=;
        b=GoTR0Fmv1yd9p/DQw3RPJZUE8eWwzYCVjmYIfvNMxTzK+5nKcxjAnL0S2CNmeupAey
         X6wYFar3+E5l06cwSTVOQ9qrQQeFHRWQqZLczGRV+Lf+rSYCPebDQHVB1VgeLLhFPJGm
         J9Su3Tk5nBDlvnTE8PIGMiC5mAszMrHe7YoYeoXQlYW3aEWUosry1+xlCxCnnLuoqvis
         AAocrc9yDVOT+KkI1bjG6aCykmYPBXqOhOevRLeKFOaxYaRgUc6tb2Atyeltm2cSeEPo
         szlkWssSwvSmElXAOCZC0kQ1cSvLiZw77etNjEofRlJhwYFpHIl8aQX76CCRmzn5t/QO
         MK0g==
X-Gm-Message-State: AFq9FYI1uQQc4G4JTidDM27ZNlTjIjKpAujHxOqiXjPu7VU+YjfcliHe
	vxrSJE811lYSjHg3EO9KemCC9WXHe2rgzw68ccYAo5WBg7Nti33bsRmgkei2zaorOxD5dpgxZP8
	MWYxGoGJ4qW7s+MNVUNUymKsFkDdGgCD8+Uub
X-Gm-Gg: AYBFou2rQKPj3+NYmgnXFzYIZQWFn8Uwe3QY5cQtndh+Gc6ROzmEd6vWFSCNbjN6VGB
	QlpOSQEYwOYmDjhX86z78Vd3HoVXoKdAUmpED0o3HQLSo+WiXNUwksUk3UvV7WKBNthEN1JocGc
	JpjqyHqcwbVn9EEUd/li7EOjxK/DXRBYTN7GqaG0UMaIZf960TrqbSAHxDi3KFjspuSzCCpxg1b
	w5ecEtJoanX0O6mfJOcOUX8l6uVNBilvNMq9FWIpHIZ/1e4NFGE2ZpSTP1B5X9wbMgD6g9VhD/c
	y+8MEeDqRS+qXRe4upZJXmxyN5Z0vTc26M4I4QTOSW5RMjse8VfZ6qtn
Precedence: list
In-Reply-To: <CAAvCNcCwTFg8ESDBcTxDhX9K5ZF13o89qgvmPN9UQ2UCyH-c1w@mail.gmail.com>
X-Gm-Features: AclHuK_JbL-qUzQIDBoWMIFNBmjjL-zEtI2Cv-xsl91EaCjp92Sq4wKCjd6ysUs
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)[];
	MIME_TRACE(0.00)[0:+];
	FREEMAIL_ENVFROM(0.00)[gmail.com];
	FREEMAIL_FROM(0.00)[gmail.com];
	DWL_DNSWL_NONE(0.00)[gmail.com:dkim];
	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::531:from];
	TO_MATCH_ENVRCPT_SOME(0.00)[];
	RCVD_TLS_LAST(0.00)[];
	PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org];
	MID_RHS_MATCH_FROMTLD(0.00)[];
	DKIM_TRACE(0.00)[gmail.com:+]
X-Rspamd-Queue-Id: 4j1Hs7602tz4GRl
X-Newsgate-Id: f02c70b8849f+
X-No-Archive: Yes