X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Date: Mon, 3 Dec 2007 15:18:43 +0100
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: Can cygwin bypass windows file permissions?
Message-ID: <20071203141843.GP30894@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <E1IzBkc-0001ii-Nz@www11.emo.freenet-rz.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <E1IzBkc-0001ii-Nz@www11.emo.freenet-rz.de>
User-Agent: Mutt/1.5.16 (2007-06-09)
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@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

On Dec  3 14:54, wrbach@freenet.de wrote:
> Hello!
> 
> I have made a file test.txt in d:temp and removed all Windows permissions from it.
> Consequently, I cannot access the file from Windows Explorer or cmd.exe.
> 
> However, if I try the following from a cygwin bash I get the contents of the file
> $cat /cygdrive/d/temp/test.txt
> 
> How can cygwin bypass the windows file permissions, if I have even removed SYSTEM from the Acl:
> $ ls -l test.txt
> ---------- 1 Administratoren SYSTEM 3058 May  4  2006 test.txt
> 
> $ getfacl.exe test.txt
> # file: test.txt
> # owner: Administratoren
> # group: SYSTEM
> user::---
> group::---
> mask:rwx
> other:---
> 
> $ cacls test.txt
> d:temptest.txt

Cygwin opens files with the FILE_OPEN_FOR_BACKUP_INTENT flag, so you get
root-like file access privileges if you're working under an admin account.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

