delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/04/10/03:15:23

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: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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: <CAAXzdLWFNJXTS5P7ZKufcBS6bSMjxsEmZvKToQZOV5Z0_0fT-Q@mail.gmail.com>
References: <CAAXzdLUZvdNw_UyOXMa5ozoGuG7zjPnz=rRLELFBoEF8+miZUA AT mail DOT gmail DOT com> <CAAXzdLUgnjfeA=LkrdUp68zHterj5hj5BtLqh0W=TCAn1zPrpQ AT mail DOT gmail DOT com> <20150409074328 DOT GO2819 AT calimero DOT vinschen DOT de> <CAAXzdLV4=f5hbmKH_6r6GM=cF4bw0QXqkmivZCh2M4y5ATagxA AT mail DOT gmail DOT com> <CADi7v6++4rbLPD0ZuCMrnONs+kYFMFf6hhS_0SXVGSNwoMTtNg AT mail DOT gmail DOT com> <CAAXzdLWbVS9g4zbn9WBVinighLy1NkA++iWm1MEyTd3b0bWrHw AT mail DOT gmail DOT com> <CAAXzdLWFNJXTS5P7ZKufcBS6bSMjxsEmZvKToQZOV5Z0_0fT-Q AT mail DOT gmail DOT 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 AT gmail DOT com>
To: cygwin AT cygwin DOT com
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019