From Nehal@shaw.ca  Tue Oct 26 04:21:20 2004
Return-Path: <Nehal@shaw.ca>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id DA2F516A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 26 Oct 2004 04:21:20 +0000 (GMT)
Received: from shaw.ca (S0106000ae6ceb225.vf.shawcable.net [70.68.12.33])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 8ABA943D1F
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 26 Oct 2004 04:21:20 +0000 (GMT)
	(envelope-from Nehal@shaw.ca)
Received: from Nehal.Home (somebody@localhost.Home [127.0.0.1])
	by shaw.ca (8.13.1/8.13.1) with ESMTP id i9Q4LV5M002064
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 25 Oct 2004 21:21:31 -0700 (PDT)
	(envelope-from Nehal@Nehal.Home)
Received: (from Nehal@localhost)
	by Nehal.Home (8.13.1/8.13.1/Submit) id i9Q4LVFJ002063;
	Mon, 25 Oct 2004 21:21:31 -0700 (PDT)
	(envelope-from Nehal)
Message-Id: <200410260421.i9Q4LVFJ002063@Nehal.Home>
Date: Mon, 25 Oct 2004 21:21:31 -0700 (PDT)
From: Nehal <nehalmistry@gmx.net>
Reply-To: Nehal <nehalmistry@gmx.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: cannot chmod mount point for read-only filesystem
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         73148
>Category:       kern
>Synopsis:       cannot chmod mount point for read-only filesystem
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct 26 04:30:20 GMT 2004
>Closed-Date:    Tue Oct 26 06:32:58 GMT 2004
>Last-Modified:  Tue Oct 26 06:32:58 GMT 2004
>Originator:     Nehal Mistry
>Release:        FreeBSD 5.3-BETA7 i386
>Organization:
>Environment:
System: FreeBSD Nehal 5.3-BETA7 FreeBSD 5.3-BETA7 #0: Tue Oct 12 23:00:48 PDT 2004 Nehal@Nehal:/usr/src/sys/i386/compile/NEHAL i386


	
>Description:
if you mount a read-only filesystem, you cannot chmod
the mount point , you will get an error. for example:

# chmod g-r /DATA
chmod: /DATA: Read-only file system
#

the chmod should only be denied for files/subdirectories
inside the mount point, not the mount point itself.
	
>How-To-Repeat:
- mount a filesystem as read-only
- chmod the mount point
	
>Fix:

	


>Release-Note:
>Audit-Trail:

From: Nehal <nehalmistry@gmx.net>
To: FreeBSD-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: kern/73148: cannot chmod mount point for read-only filesystem
Date: Mon, 25 Oct 2004 22:02:29 -0700

 this bug opened 3 PR's by mistake,
 73146,73147,73148
 can someone remove (or at least close) 2 of these
 i'm aware of why this happened, won't happen again

From: Gregory Bond <gnb@itga.com.au>
To: Nehal <nehalmistry@gmx.net>
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.
 
State-Changed-From-To: open->closed 
State-Changed-By: maxim 
State-Changed-When: Tue Oct 26 06:31:22 GMT 2004 
State-Changed-Why:  
Dup of kern/73146. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=73148 
>Unformatted:
