X-Recipient: archive-cygwin@delorie.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:mime-version:in-reply-to:references:date
	:message-id:subject:from:to:content-type; q=dns; s=default; b=H9
	etrKThqe6hobG0QqBPYiRW/Y6B8XfXw8hTUwAo+sm/zRJED3fV5YhA+mBJ6TNvj0
	HqNMMFhqL9tAHdHiEYKA0bmG9B+LLcZc/drVS7ToFC8zhLSN0sDQx4jTmkjZwbxF
	X7LCWsFMKT67MiSiqFtfmuvcfEiLgrCRZQTj9vnEI=
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:mime-version:in-reply-to:references:date
	:message-id:subject:from:to:content-type; s=default; bh=tYrJZHgE
	2HyCrd44/FrdVhvB/vQ=; b=dxDombhm8Q174vMSbN3G0Yyqc/zzPS+sVhq/vnak
	OuFVNXRqhKqxedpnS++YeYskviftjaa5l+IbFRpz9tR8p+U1BEijr7k3mVgGpjow
	Zyzwtcsa4o+9jY1MjlivyZO5UVR8o1YM4iv7NPpMzTygNblXE7/WDy5iOqClN60K
	Qsc=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mail-ig0-f170.google.com
MIME-Version: 1.0
X-Received: by 10.107.39.72 with SMTP id n69mr332042ion.8.1428650099989; Fri, 10 Apr 2015 00:14:59 -0700 (PDT)
In-Reply-To: <CAAXzdLWFNJXTS5P7ZKufcBS6bSMjxsEmZvKToQZOV5Z0_0fT-Q@mail.gmail.com>
References: <CAAXzdLUZvdNw_UyOXMa5ozoGuG7zjPnz=rRLELFBoEF8+miZUA@mail.gmail.com>	<CAAXzdLUgnjfeA=LkrdUp68zHterj5hj5BtLqh0W=TCAn1zPrpQ@mail.gmail.com>	<20150409074328.GO2819@calimero.vinschen.de>	<CAAXzdLV4=f5hbmKH_6r6GM=cF4bw0QXqkmivZCh2M4y5ATagxA@mail.gmail.com>	<CADi7v6++4rbLPD0ZuCMrnONs+kYFMFf6hhS_0SXVGSNwoMTtNg@mail.gmail.com>	<CAAXzdLWbVS9g4zbn9WBVinighLy1NkA++iWm1MEyTd3b0bWrHw@mail.gmail.com>	<CAAXzdLWFNJXTS5P7ZKufcBS6bSMjxsEmZvKToQZOV5Z0_0fT-Q@mail.gmail.com>
Date: Fri, 10 Apr 2015 02:14:59 -0500
Message-ID: <CAAXzdLVw7sukba5HjxKyNnDX2bR2btPES_ae+DhLaCCUKG7SMw@mail.gmail.com>
Subject: Re: setfacl can kill a drive
From: Steven Penny <svnpenn@gmail.com>
To: cygwin@cygwin.com
Content-Type: text/plain; charset=UTF-8
X-IsSubscribed: yes

On Thu, Apr 9, 2015 at 10:38 PM, Steven Penny wrote:
>     $ icacls 'C:\.' /restore 'C:\acl.txt'
>     C:\.\.: Access is denied.

I believe the following commands will fix it. After setfacl trashes the
permissions, you need to temporarily take ownership of "C:\", restore the
permissions then set the owner back. Of course this is contingent on either
having backed up the permissions beforehand, or perhaps transferring them from
a clean virtual machine.

    icacls 'C:\.' /save 'C:\acl.txt'
    setfacl --remove-all /cygdrive/c
    takeown /f 'C:\.'
    icacls 'C:\.' /grant users:f
    icacls 'C:\acl.txt' /grant users:f
    icacls 'C:\.' /restore 'C:\acl.txt'
    icacls 'C:\.' /setowner 'NT SERVICE\TrustedInstaller'

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

