Repairing permissions after windows reinstall

Corinna Vinschen
Tue Jun 28 11:42:00 GMT 2016

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 Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <>

More information about the Cygwin mailing list