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: Repairing permissions after windows reinstall


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.

Alternativaly there are tools in the wild to change the SID of a file.
But those *might* break Cygwin POSIX ACLs.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: signature.asc
Description: PGP signature


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