delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/03/02/23:07:13

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <4B8DE065.9000600@wesbarris.com>
Date: Wed, 3 Mar 2010 14:07:01 +1000
From: Wes Barris <wesb AT wesbarris DOT com>
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Resolving '????????' users and groups
References: <4B8CA8D3 DOT 6010508 AT wesbarris DOT com> <4B8DC6CD DOT 5050508 AT gmail DOT com> <4B8DC7C5 DOT 9040200 AT wesbarris DOT com> <4B8E1A6C DOT 2090909 AT cygwin DOT com> <4B8DD6A2 DOT 1070608 AT wesbarris DOT com> <4B8E24E1 DOT 7050609 AT cygwin DOT com>
In-Reply-To: <4B8E24E1.7050609@cygwin.com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Larry Hall (Cygwin) wrote:
> On 3/2/2010 10:25 PM, Wes Barris wrote:
>> Larry Hall (Cygwin) wrote:
>>> On 3/2/2010 9:21 PM, Wes Barris wrote:
>>>> Dave Korn wrote:
>>>
>>> <snip>
>>>
>>>>> Do you *actually* own the files? What kind of drive is this; 
>>>>> network or
>>>>> local? NTFS or FAT?
>>>>
>>>> This is a second drive in my XP system. The drive contains all of my
>>>> data. One of the folders/directories on this drive is what I use
>>>> as my home directory. It has an NTFS filesystem. I map my home
>>>> directory on this drive to a drive letter so it shows up in
>>>> Windows Explorer as a mapped network drive even though it is a disk
>>>> physically on the same system. This is a relatively new disk
>>>> (and computer). I copied my all of my data from my previous computer
>>>> onto this disk in this new computer.
>>>>
>>>> I've always thought that I actually owned the files. The Windows
>>>> security tab says that I own them. It wasn't until I installed
>>>> Cygwin that I had any reason to believe otherwise.
>>>>
>>>> I see that I can do a "chown -R wes" on a directory and it makes
>>>> me the owner as far as Cygwin is concerned. Windows Explorer
>>>> says that I am the owner before and after doing this. I can do
>>>> this to fix all of the files. It's just a bit curious to me that
>>>> Cygwin says I am not the owner but Windows does.
>>>
>>> How was the data copied? By whom?
>>
>> I copied the data. I put both disks into one computer and used
>> Windows Explorer to drag folders from one disk to another.
> 
> As long as that was your target machine, that should have removed
> SIDs that the target machine didn't know about.  I can't explain
> why any unknown SIDs would be left.
> 
>>> The simple answer to the question of why Cygwin doesn't know you're
>>> the owner is likely to be that the SID of the owner of these files is
>>> not listed in '/etc/passwd'.
>>
>> Thanks. That is actually how this thread got started. My SID in
>> my /etc/passwd file does not match that of my files. Evidently,
>> the way I copied my files is incompatible with Cygwin.
> 
> Hm.
> 
>>> Get it in there using 'mkpasswd' and
>>> Cygwin will show you that user as the owner.
>>
>> mkpasswd shows an SID that is evidently different from that of my
>> files.
> 
> If you know where the SID came from and can run 'mkpasswd' on
> that machine, you should be able to take the right line from
> that file and move it into the one on your machine to make
> Cygwin show you a user and group that it knows about.  But if
> your target system really doesn't have that SID, then this is
> largely machinations for the sake of cosmetics.  In other words,
> if you know the SID involved, you can simply type it into
> '/etc/passwd' with a new, valid and concocted entry too but
> I'm not sure that helps.
> 
>>> Since you changed the
>>> owner already, this is likely moot at this point though.
>>
>> If I re-install Windows on the same computer does the SID of the
>> machine change? Or is the SID tied to the hardware? If it changes
>> with a new install that would explain my problem.
> 
> How it's computed seems to be a bit of a secret but I would say
> you can't be guaranteed of the same SID after a re-install, no
> matter how similar (or the same) the machine.  That doesn't mean
> you cannot get a machine with the same SIDs.  Cloning is the most
> common way to make this happen.

Thanks Larry.  Looking back I'm guessing that re-installing Windows
was the most likely culprit in changing my SID.  Windows itself
appears to me more forgiving of this change.  Since I've chowned
my files, the matter is resolved on this system.  I have other
systems where I see the dreaded '????????' in my directory listings.
Those systems are unrelated to this so I will use a different
thread for them.

-- 
Wes Barris
--------------------------------------------------------------------
Today's fortune: Memory should be the starting point of the present.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019