From frank@barda.agala.net  Fri Jan  7 20:55:32 2005
Return-Path: <frank@barda.agala.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 9F55116A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  7 Jan 2005 20:55:32 +0000 (GMT)
Received: from mail.agala.net (Iab6f.i.pppool.de [85.73.171.111])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 811F243D39
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  7 Jan 2005 20:55:30 +0000 (GMT)
	(envelope-from frank@barda.agala.net)
Received: from kairo.agala.net (mail.agala.net [192.168.20.1])
	by mail.agala.net (8.13.1/8.13.1) with ESMTP id j07KqZgb017870
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 7 Jan 2005 21:52:35 +0100 (CET)
	(envelope-from frank@kairo.agala.net)
Received: (from frank@localhost)
	by kairo.agala.net (8.13.1/8.13.1/Submit) id j07KqYMi017869;
	Fri, 7 Jan 2005 21:52:34 +0100 (CET)
	(envelope-from frank)
Message-Id: <200501072052.j07KqYMi017869@kairo.agala.net>
Date: Fri, 7 Jan 2005 21:52:34 +0100 (CET)
From: "Frank J. Beckmann" <frank@barda.agala.net>
Reply-To: "Frank J. Beckmann" <frank@barda.agala.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Usermount changes owner of mount point to root:wheel
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         75930
>Category:       bin
>Synopsis:       Usermount changes owner of mount point to root:wheel
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jan 07 21:00:44 GMT 2005
>Closed-Date:    Fri Jan 07 22:50:42 GMT 2005
>Last-Modified:  Fri Jan 07 22:50:42 GMT 2005
>Originator:     Frank J. Beckmann <frank@barda.agala.net>
>Release:        FreeBSD 5.3-STABLE i386
>Organization:
Agala Naga Doron
>Environment:
System: FreeBSD kairo.agala.net 5.3-STABLE FreeBSD 5.3-STABLE #5: Wed Dec 8 19:21:37 CET 2004 root@kairo.agala.net:/usr/obj/usr/src/sys/KAIRO i386


	
>Description:
	When a non root user mounts a filesytem, the filesystem becomes
	owned be root:wheel. That ist anoying because the user can not
	create objects in the root of the newly mounted media (removable
	disks etc).
>How-To-Repeat:
	Allow non root users to mount filesystems (sysctl vfs.usermount=1).
	As an non root user create a directory in your home directory. Now
	mount a filesystem (e.g. CD-ROM or a removable disk) to that newly
	createt directory. That directory is now owned by root:wheel until
	you unmount the filesystem.
>Fix:

	


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: ceri 
State-Changed-When: Fri Jan 7 22:49:06 GMT 2005 
State-Changed-Why:  
This is because root owns the root directory of the mounted filesystem. 
I'm afraid the changes would need to be made on the filesystems being 
mounted.  Gregory Bond explained this quite nicely in 
http://www.freebsd.org/cgi/query-pr.cgi?pr=73146: 

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[sic] is as designed. 

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