From owner-freebsd-bugs@FreeBSD.ORG Tue Oct 26 05:30:36 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 9607B16A4CE for ; Tue, 26 Oct 2004 05:30:36 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 88FE143D49 for ; Tue, 26 Oct 2004 05:30:36 +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 i9Q5UaKQ068957 for ; Tue, 26 Oct 2004 05:30:36 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i9Q5Uakv068955; Tue, 26 Oct 2004 05:30:36 GMT (envelope-from gnats) Date: Tue, 26 Oct 2004 05:30:36 GMT Message-Id: <200410260530.i9Q5Uakv068955@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Gregory Bond Subject: Re: kern/73148: cannot chmod mount point for read-only filesystem X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Gregory Bond List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Oct 2004 05:30:36 -0000 The following reply was made to PR kern/73148; it has been noted by GNATS. From: Gregory Bond To: Nehal Cc: FreeBSD-gnats-submit@FreeBSD.org Subject: Re: kern/73148: cannot chmod mount point for read-only filesystem Date: Tue, 26 Oct 2004 15:22:44 +1000 Nehal wrote: >the chmod should only be denied for files/subdirectories >inside the mount point, not the mount point itself. > > Um, this is never how Unix has operated. After a mount(), the underlying inode of the mount point is completely inacessible and hidden by the root inode of the mounded FS until an unmount is done. It's been this way since V7 or earlier. The FreeBSD man page for mount(2) hides this a bit with some flowery language ("swept under the carpet"), but consider the wording from Solaris 2.8 man page: DESCRIPTION The mount() function requests that a removable file system contained on the block special file identified by spec be mounted on the directory identified by dir. The spec and dir arguments are pointers to path names. After a successful call to mount(), all references to the file dir refer to the root directory on the mounted file system. In other words, this beahviour is as designed.