From nobody@FreeBSD.org  Mon Jul  8 00:59:49 2002
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id A23C737B400
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  8 Jul 2002 00:59:49 -0700 (PDT)
Received: from www.freebsd.org (www.FreeBSD.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 65B7A43E31
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  8 Jul 2002 00:59:49 -0700 (PDT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.4/8.12.4) with ESMTP id g687xnOT058610
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 8 Jul 2002 00:59:49 -0700 (PDT)
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.4/8.12.4/Submit) id g687xnlx058609;
	Mon, 8 Jul 2002 00:59:49 -0700 (PDT)
Message-Id: <200207080759.g687xnlx058609@www.freebsd.org>
Date: Mon, 8 Jul 2002 00:59:49 -0700 (PDT)
From: Kevin Stevens <kevin_stevens@pursued-with.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: UID changes not reflected in viewed file/directory ownership
X-Send-Pr-Version: www-1.0

>Number:         40325
>Category:       misc
>Synopsis:       UID changes not reflected in viewed file/directory ownership
>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:   Mon Jul 08 01:00:10 PDT 2002
>Closed-Date:    Sat Jul 12 17:51:22 PDT 2003
>Last-Modified:  Sat Jul 12 17:51:22 PDT 2003
>Originator:     Kevin Stevens
>Release:        4.6-RELEASE
>Organization:
Sporadic
>Environment:
FreeBSD babelfish.pursued-with.net. 4.6-RELEASE FreeBSD 4.6-RELEASE #0: Mon Jul  1 23:26:12 PDT 2002     root@babelfish.pursued-with.net.:/usr/src/sys/compile/kernel.2002070101  i386
      
>Description:
When a user account is modified to change the UID, files and directories created by the prior UID still show as owned by that username.  However, the user cannot access them since they are (presumably) actually owned by the prior UID.  Other OS's I've used deal with this case by displaying the files as owned by the prior UID number, so they can be readily identified and updated.      
>How-To-Repeat:
Create a user.  Create files as that user (permissions 600).  ls -l the files and verify that they are owned by that username.  Change the user's UID (as root, using pw).  ls -l the files and verify that they are still shown as owned by the username.  Attempt to access the files and verify that the new UID cannot access them.      
>Fix:
The file ownerships can be updated normally using chown.  Of course, it's confusing, since both old UID and new UID files for a given user show as being owned by <username>.  I don't know of a workaround.  
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: kris 
State-Changed-When: Sat Jul 12 17:45:08 PDT 2003 
State-Changed-Why:  
I am unable to reproduce this: changing the uid of a user 
causes ls of files owned by the old uid to be displayed 
numerically, as expected (since ls obtains the user name 
by looking up the uid in the password file, there is no 
way it can obtain stale information about the old uid) 

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