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: Tue, 28 Jun 2016 12:08:07 +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> <20160628103406 dot GB22797 at calimero dot vinschen dot de>
Corinna Vinschen writes:
> On Jun 28 11:04, Henry S. Thompson wrote:
>> 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.
>> 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?
>> Can this be easily fixed, i.e. put me back where I used to be?
> Off the top of my head, what you could do is this:
> - Generate an /etc/passwd entry for your old user SID by hand.
> Make sure to use an arbitrary weird UID like 98765.
> - Exit and start an elevated shell.
> - find . -uid 98765 | xargs chown <newuser name or UID>
> Analog for the group if necessary.
Thanks, but ownership is not the problem. The problem is that the ACLs
(as reported by Windows itself via the Security tab) don't allow the new
me (or OWNER) the necessary (or indeed any) permissions, those are given
to the old SID.
Here's what shows up for /bin:
Advanced Security Settings for bin
Owner: ht (LUTHER\ht) ' Change
Type Principal Access lnherite... Applies to
Allow S-1-5-21-32...-1001 Full control None This folder only
Allow S-1-5-21-32...-513 Read & ex... None This folder only
Allow Everyone Read & ex... None This folder, subfolders and files
Allow CREATOR OWNER Full control None Subfolders and files only
Allow CREATOR GROUP Read & ex... None Subfolders and files only
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