This is the mail archive of the
mailing list for the Cygwin project.
Re: Repairing permissions after windows reinstall
- From: ht at inf dot ed dot ac dot uk (Henry S. Thompson)
- To: cygwin at cygwin dot com
- Date: Fri, 01 Jul 2016 14:35:48 +0100
- Subject: Re: Repairing permissions after windows reinstall
- Authentication-results: sourceware.org; auth=none
- References: <f5bh9cdociz dot fsf at troutbeck dot inf dot ed dot ac dot uk> <57291758 dot 20160701090000 at yandex dot ru>
Andrey Repin writes:
> Greetings, Henry S. Thompson!
>> Good news: My cygwin file tree survived a Windows (10) reinstall
>> Not-so-good news: I have a new SID, so not only do I not own those files
>> any more (that's easily fixed), but I don't have the permissions I
>> should, because they are now held by some miscellaneous old SID.
> So, what? Go to top directory properties, Advanced, Owner tab, Change, and
> change the owner to what is desired.
Much to glib an answer. Changing the owner is the _last_ thing you want
to do after (programmatically) changing a bunch of ACLs.
>> In fact I see _two_ raw SIDs when I look at the security tab for any
>> directory in the old cygwin tree: one has Full control, and the other
>> just Read & execute.
>> I presume the first is the old me, what's the second?
> If you write these SID's it would be easier to tell.
...-513 - Domain User, it turns out.
>> Can this be easily fixed, i.e. put me back where I used to be?
> As Corinna said, this can be fixed, you just have to fake a valid UID for old
> user to jumpstart the process.
> Obviously, you would need to run the script as administrator account to work
> on the permissions changes.
Script is non-obvious, will share once I have mostly debugged it.
Henry S. Thompson, School of Informatics, University of Edinburgh
10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: email@example.com
[mail from me _always_ has a .sig like this -- mail without it is forged spam]
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple