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:date:from:to:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; q=dns; s= default; b=iynGgrKA3yIWFHbr/yu3InjEYJmeiBHrbzuRvdaBAyx2Y3vn6xNJW 9fzONSPXsiFbEGTnizTQi8TBYKRCyjRKF047b/3CL3gmQk4K0B9b+HTrUNJdVZtD 55MkpFUlTtRsFFSjvSWFppDK9Tr+h0TXGGFVjcsjhOcdUeX4w500mc= 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:date:from:to:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; s=default; bh=fHCzQEaZz2gT/Q13e05Z/Unnc30=; b=ctvQ05wjU1aP7rXDDLVWT57bSLCv VDyLbyjmQYvwthuD0aNTjVZe0uYHnNDaEVWrMsyJTHvxkWyN+/KjifShZD/NiWqh K7MdS3dePvVbNF2zRb+KxpeRLMn0AQDfFKTqmuEPaQeXtCrWQsPsx8XCgroa6b1O u9tMb3oEqkswrNY= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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=-96.3 required=5.0 tests=AWL,BAYES_00,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_PBL,RCVD_IN_SORBS_DUL,RDNS_DYNAMIC autolearn=ham version=3.3.2 spammy=H*f:sk:f5bd1n1, H*MI:sk:f5bd1n1, H*i:sk:f5bd1n1, Full X-HELO: calimero.vinschen.de Date: Tue, 28 Jun 2016 13:41:50 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Repairing permissions after windows reinstall Message-ID: <20160628114150.GA25348@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20160628103406 DOT GB22797 AT calimero DOT vinschen DOT de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="u3/rZRmxL6MmkK24" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.1 (2016-04-27) --u3/rZRmxL6MmkK24 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Jun 28 12:08, Henry S. Thompson wrote: > Corinna Vinschen writes: >=20 > > 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 fil= es > >> 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. > >>=20 > >> 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. > >>=20 > >> I presume the first is the old me, what's the second? > >>=20 > >> 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 > > > > Analog for the group if necessary. >=20 > 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. Ok, hmm. In that case you could check the current permissions with getfacl and then call setfacl with a modified ACL giving the owner the permissions of user 98765 while at the same time remove=20 the entry for user 98765. It's just a bit of shell script hacking. Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --u3/rZRmxL6MmkK24 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXcmJ+AAoJEPU2Bp2uRE+gwwQP/3E2CTH0Op0DGBnt5fpC9BnY qvgO6ZXQ7ueDtZh6lxm0813glVbp72oqR/oxwSk07puHu5OkgMRmpDgfKfXLberN U//HXa4xdst6qTb3IfhBECLCakZzQk/ipOnZfZBc7aKXJZ/pJQ/PNkmRX6jdy4xU S/WBOthAodYsUdu97k28oljbyvRBAWzfsFvdCJyfSR4dhvCRYzEEusoMq0/J2Q36 rWkn6oQnvme1y9+0y1Q0DbQbZFKhKqnrtBjGMBtfTRRb5pOczuqDyOxfmmAaEocT +KxH9XAq6hvvnjJlXGrdy0MQOiXk58COAsyhDB6Uf3yYWOrHzluitLK9DJ5DaK0H jPsmkPeBlejJQFeonOO9520Fwp1O1SyWSKtUZUgcZtj7rU1efI2CtfDnTWz3gPG4 NT5T2jn06Q7SkIPIkhzAD9zysy91kMKTc2h+Ek7Dfjv0q2T3s5yMsm18mVXxo0Jd hm8WDqmCdWsV6FhR3ESQr/4WlsOFoQgfuw3qUuSTO26tRm8QzqsiUoYa3zpfYSMz TUyxSzhmq5iBvGewXpd6drMKPngtGcnLPXF/zCU9DCpyN8wiv9WXOyTkgVxgUQuQ 8MwHJDQkkEh84VfniDIh+cGw78FLdDlXX4PQVClITg2ApTL0riTrXml8En8D7XWV MrdM8jrj7rQ8VX0VWphY =ffya -----END PGP SIGNATURE----- --u3/rZRmxL6MmkK24--