From nobody Sun Jun 12 22:43:18 2022 X-Original-To: fs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7CAE58453E6 for ; Sun, 12 Jun 2022 22:43:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LLqVH2FHJz4bPq for ; Sun, 12 Jun 2022 22:43:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2E87D20B6 for ; Sun, 12 Jun 2022 22:43:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 25CMhJd9054601 for ; Sun, 12 Jun 2022 22:43:19 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 25CMhJXD054600 for fs@FreeBSD.org; Sun, 12 Jun 2022 22:43:19 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: fs@FreeBSD.org Subject: [Bug 264570] nfsuserd: Mapping of Userids mismatched Date: Sun, 12 Jun 2022 22:43:18 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: rmacklem@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: fs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Filesystems List-Archive: https://lists.freebsd.org/archives/freebsd-fs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-fs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655073799; h=from:from: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; bh=1hvU+qZ9VWTdyMtZRZrNke+2THzeRQrAQpVVShqXHRA=; b=ExI2A64PjOXJNFmkZjwXtE6wndur/SB+CzrV28+Fthgwu6EDqlahiEHG2j7hBWsHgaSAXI TdMcD8Cqtvs+8W8JKWGHI5DNfmuMUG5/+J1GvUdY46d9i6bCxxFL5wonJGodKBZpHG9Uev ogsMEunwLE1UHTTzfP1nhErAQbEtsS9UAQzOCUuzNcDdaMnBRTe5EADFp+N8eSNtu6nvQA zdbIBicaY4UIHNGnM1tA3/L30Xz3DXLN2fpKY75ZvQJhVrTOxO286UXCSzhj0+LhCwDWCA /fj4NK8PuRAkAuxoFq399Fy7+9vt6fMZ6+4xQQBfZ5ztTaOrp0UNDfpXxe2PBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1655073799; a=rsa-sha256; cv=none; b=RARq62MXYOw/KS3qTcXQR8XtUgWf6qz1Qx/ckqyjZvAvMepqd9+zCVTGfQq3xxSpGl5gyc pGOe4dOf6ArfIIQFfVfJ5p8AQLNNQOfZUrCAGcYp2gYlpQ1/f1xkq7T9VbVqQWTRrHLiNr dflM4H1XeVZz9Yjg7RK5//d5csID1vNo7ZUteLKb6xzmVULdn2wkJWf1vH/mMn/f7hGKSx H6WgpAHVWGsqnaChe2Loe0v/mR+AsuZZzIQd/QoMcyjIXS77LLJZadvMpQYpCdd3sO83vl W0RzqUCjhwKrBRY74TDVeqMEqo+vMknFC199/V+AAbVdREPIIuBSvQnZuwP7cA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D264570 --- Comment #2 from Rick Macklem --- A few comments... - If you are using nfsuserd, both sysctls should be 0. vfs.nfs.enable_uidtostring=3D0 vfs.nfsd.enable_stringtouid=3D0 on the server. On the client, vfs.nfsd.stringtouid is not used. - Since you are using AUTH_SYS (sec=3Dsys), then the credentials in the RPC requests header are numeric uids. That is the "user" doing the create and, therefore, that "uid" is going to be the owner. nfsuserd or "numbers in user/group strings" only affects the entries in Getattr/Setattr for Owner and OwnerGroup and does not affect the RPC request's user credentials in the RPC header. (The only time there are no numeric uids in the RPC request's credential is when Kerberized mounts are being used. For that case, the credential refers to a Kerberos principal, which is normally "user@REALM".) - In "man nfsv4" it states... Although uid/gid numbers are no longer used in the NFSv4 protocol exce= pt optionally in the above strings, they will still be in the RPC authentication fields when using AUTH_SYS (sec=3Dsys), which is the default. As such, in this case both the user/group name and number spaces must be consistent between the client and server. To do otherwise, simply breaks things, as you have demonstrated. --=20 You are receiving this mail because: You are the assignee for the bug.=