delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/07/01/09:36:35

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:to:subject:references:from:date:in-reply-to
:message-id:mime-version:content-type; q=dns; s=default; b=dOe0v
cwfBAu/dHntP/v6A0GFv9btJDk7mVDxg2+9iG42GDZzVnwseFts71w4jnnSt+oVb
1pb58N8van6Yf2gXBZ7x4Xn26Jzie4TQjLuXc9dwQxVTN9cVKnJU0e8WnugirVnV
Te3fQMzkivgqpPDwpWMwKCHziusO+EvOBkmlPU=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:to:subject:references:from:date:in-reply-to
:message-id:mime-version:content-type; s=default; bh=Ksr6jxR388d
2ixauhnF4Mp+x9SM=; b=Nvr72zYlo7cJqkA2k69wcsFkc7XmRxazplJXjJtiklE
ZAAP120fwXHp1gzvciQHfRIzif+qPg5rYFktCa8vLKQeSFerTgVoj9tr5IoNgt22
ybTse8W17U79C0zFtxWIbkGVg9OOqvb/4QcKTWzMjUpWOJCwlFArRjYX1INQ3tdg
=
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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_50,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=debugged, Hx-languages-length:1621, D*ac.uk, ht AT inf DOT ed DOT ac DOT uk
X-HELO: treacle.ucs.ed.ac.uk
To: cygwin AT cygwin DOT com
Subject: Re: Repairing permissions after windows reinstall
References: <f5bh9cdociz DOT fsf AT troutbeck DOT inf DOT ed DOT ac DOT uk> <57291758 DOT 20160701090000 AT yandex DOT ru>
From: ht AT inf DOT ed DOT ac DOT uk (Henry S. Thompson)
Date: Fri, 01 Jul 2016 14:35:48 +0100
In-Reply-To: <57291758.20160701090000@yandex.ru> (Andrey Repin's message of "Fri\, 1 Jul 2016 09\:00\:00 +0300")
Message-ID: <f5bbn2hfpl7.fsf@troutbeck.inf.ed.ac.uk>
User-Agent: Gnus/5.1012 (Gnus v5.10.12) XEmacs/21.5-b34 (linux)
MIME-Version: 1.0
X-Edinburgh-Scanned: at treacle.ucs.ed.ac.uk with MIMEDefang 2.60, Sophie, Sophos Anti-Virus, Clam AntiVirus
X-IsSubscribed: yes

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.

ht
-- 
       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: ht AT inf DOT ed DOT ac DOT uk
                       URL: http://www.ltg.ed.ac.uk/~ht/
 [mail from me _always_ has a .sig like this -- mail without it is forged spam]

--
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