This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Files not accessible after reinstalling OS and cygwin


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]