delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/10/29/00:05:10

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
Message-ID: <4362F4EC.4D5EE03B@dessent.net>
Date: Fri, 28 Oct 2005 21:05:00 -0700
From: Brian Dessent <brian AT dessent DOT net>
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Files not accessible after reinstalling OS and cygwin
References: <aae3b6bc0510282034gec55defl12cb2cdb85a90083 AT mail DOT gmail DOT com> <aae3b6bc0510282036q60bb66bdrfce1c59a8ce6717a AT mail DOT gmail DOT com>
X-IsSubscribed: yes
Reply-To: cygwin AT cygwin DOT com

Deb* Mohanty wrote:

> I had windows2k and cygwin installed on my machine, and I had marked
> some files as read-only (using cygwin chmod). For some reasons, I had
> to reinstall windows2k. I also reinstalled cygwin in the same location
> as it was installed earlier.
> 
> However the files which were marked read-only earlier are not
> accessible now. They can't be deleted either. Those are huge files and
> taking up the space.

When you reinstall Windows your new user account has a new SID - or
maybe it's not a new SID per se but there is some kind of GUID that
uniquely identifies a certain user on a certain installation of
windows.  I'm not sure of the precise term for this.

So when you reinstall Windows, you get a new GUID, which means that any
ACLs that refer to the old user do not apply to any of the new users,
even if the names are the same.  In other words, a user named "brian" on
the new installation is not the same as user named "brian" on the old
one, even if they both have the same UID.

This is just a long winded way of saying that the ACLs you created on
the old install are doing precisely what you told them to do, preventing
write access to anyone but the owner.  And technically your new user
account is not the owner because it's not the same account.  So just
take ownership of the files.  You can do this recursively for an entire
directory tree in a single operation using Explorer.  Properties ->
Security -> Advanced -> Owner.  The Cygwin equivalent would be "chown -R
user /path"

Brian

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

- Raw text -


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