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: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 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=-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: References: <20150409074328 DOT GO2819 AT calimero DOT vinschen DOT de> Date: Fri, 10 Apr 2015 02:14:59 -0500 Message-ID: Subject: Re: setfacl can kill a drive From: Steven Penny To: cygwin AT cygwin DOT 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