From owner-freebsd-bugs@FreeBSD.ORG Thu Jul 22 08:50:28 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 441F916A4CE for ; Thu, 22 Jul 2004 08:50:28 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 06BAD43D5C for ; Thu, 22 Jul 2004 08:50:28 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i6M8oRmU094295 for ; Thu, 22 Jul 2004 08:50:27 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i6M8oRMZ094294; Thu, 22 Jul 2004 08:50:27 GMT (envelope-from gnats) Resent-Date: Thu, 22 Jul 2004 08:50:27 GMT Resent-Message-Id: <200407220850.i6M8oRMZ094294@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Matthias Schuendehuette Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CC56416A4CF for ; Thu, 22 Jul 2004 08:43:11 +0000 (GMT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id C314443D48 for ; Thu, 22 Jul 2004 08:43:11 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.12.11/8.12.11) with ESMTP id i6M8hBxc003618 for ; Thu, 22 Jul 2004 08:43:11 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.11/8.12.11/Submit) id i6M8hBxG003617; Thu, 22 Jul 2004 08:43:11 GMT (envelope-from nobody) Message-Id: <200407220843.i6M8hBxG003617@www.freebsd.org> Date: Thu, 22 Jul 2004 08:43:11 GMT From: Matthias Schuendehuette To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: kern/69420: chown(8) not possible on NFS Filesystems from a FreeBSD Server X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jul 2004 08:50:28 -0000 >Number: 69420 >Category: kern >Synopsis: chown(8) not possible on NFS Filesystems from a FreeBSD Server >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Jul 22 08:50:27 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Matthias Schuendehuette >Release: FreeBSD 5.2.1-RELEASE-p9 >Organization: SIEMENS AG >Environment: FreeBSD blnn719x.ww004.siemens.net 5.2.1-RELEASE-p9 FreeBSD 5.2.1-RELEASE-p9 #2: Fri Jul 2 09:50:02 CEST 2004 root@blnn719x.ww004.siemens.net:/usr/obj/usr/src/sys/BLNN719X i386 >Description: If I try as an ordinary user to chown(8) a file which is owned by that user, the (FreeBSD-) NFS-Server responds with 'not owner' and refuses the change of ownership. It works as 'root' if root-access is enabled on that filesystem. chmod(1) and chgrp(1) are working as expected. I tested on NFS-Servers with FreeBSD 4.10-STABLE, 5.2.1-RELEASE-p9 and 5.2-CURRENT (of Jul 20, 2004) and HP-UX 11.11 - the HP-UX Server behaves as expected and lets a user change the ownership of his files. I have libpcap-format networktraces of the SETATTR call&reply available for NFSv2 and NFSv3. Especially with NFSv3 one can see the RPC-credentials (UID) and the unchanged UID of the fileowner in question - they are explicitly the same. The returncode of the SETATTR-call is ERR_PERM(1). Priority is 'high' because this occurs on two production servers :-( >How-To-Repeat: Mount a filesystem from a FreeBSD-Server and try (as a non-root user) to change the ownership of your files, >Fix: >Release-Note: >Audit-Trail: >Unformatted: