From owner-freebsd-bugs@freebsd.org Sat Nov 28 05:05:27 2020 Return-Path: Delivered-To: freebsd-bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 912BD4761FF for ; Sat, 28 Nov 2020 05:05:27 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 4CjfZb3Pr4z3CKs for ; Sat, 28 Nov 2020 05:05:27 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 72E954761FD; Sat, 28 Nov 2020 05:05:27 +0000 (UTC) Delivered-To: bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 71739476024 for ; Sat, 28 Nov 2020 05:05:27 +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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CjfZb2N2yz3BtR for ; Sat, 28 Nov 2020 05:05:27 +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 405BC21E0E for ; Sat, 28 Nov 2020 05:05:27 +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 0AS55RRi031185 for ; Sat, 28 Nov 2020 05:05:27 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 0AS55R37031184 for bugs@FreeBSD.org; Sat, 28 Nov 2020 05:05:27 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: bugs@FreeBSD.org Subject: [Bug 251363] use unionfs as a disk-cache for NFS [feature] Date: Sat, 28 Nov 2020 05:05:27 +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: 12.2-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: raj@gusw.net X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@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 MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Nov 2020 05:05:27 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D251363 --- Comment #13 from Gunther Schadow --- Further confirmation of the problem, which is now a bug of unionfs not following its own specification for copymode =3D transparent. The files do not get copied with the original owner credentials. Proof: # chmod g+w test-upper # mount -t unionfs test-upper test-lower # rm test-upper/data $ cat test-lower/data I'm root $ echo "But I'm not root, and I mean it!" > test-lower/data $ ls -l test-upper/ total 4 -rw-rw-r-- 1 user wheel 33 Nov 28 04:20 data so now the file is owned by user $ rm test-upper/data $ ls -l test-lower/ total 4 -rw-rw-r-- 1 root wheel 17 Nov 28 03:39 data so clearly the user is not the right one. Why? in unionfs_subr.c: ---------------------------------------------------------- void unionfs_create_uppervattr_core(struct unionfs_mount *ump, struct vattr *lva, struct vattr *uva, struct thread *td) { VATTR_NULL(uva); uva->va_type =3D lva->va_type; uva->va_atime =3D lva->va_atime; uva->va_mtime =3D lva->va_mtime; uva->va_ctime =3D lva->va_ctime; switch (ump->um_copymode) { case UNIONFS_TRANSPARENT: uva->va_mode =3D lva->va_mode; uva->va_uid =3D lva->va_uid; uva->va_gid =3D lva->va_gid; break; ---------------------------------------------------------- it should have been done! What if this is an issue with my code changes? No= , I verified it, it is happening on the original unionfs.ko just the same. I will make another ticket from that, because it's not my fault. But it's a major road block to getting this to work. --=20 You are receiving this mail because: You are the assignee for the bug.=