delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/11/14/05:02:40

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Sat, 14 Nov 2009 11:01:23 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: 1.7 file permissions changes
Message-ID: <20091114100123.GB5199@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <501545 DOT 51925 DOT qm AT web65401 DOT mail DOT ac4 DOT yahoo DOT com>
MIME-Version: 1.0
In-Reply-To: <501545.51925.qm@web65401.mail.ac4.yahoo.com>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

On Nov 13 15:15, Eric Benson wrote:
> > Without more details I hazard a guess: The Windows process creates the
> > directory without permissions for you to delete the directory or files
> > in that directory and you're running under UAC.
> 
> Yes, this turns out to be true. I disabled UAC entirely and now my
> program works.

It's not exactly necessary to switch UAC off, you can also tweak the
permissions of the directory or the parent directory to get what you
want.

> Is there a better way to share file and directory creation,
> modification and deletion between Cygwin processes and ordinary
> Windows processes, 

Has the directory been created via Cygwin's mkdir?  If so, it might be
fixed if you upgrade to Cygwin 1.7.0-64 and create the directory (and/or
the parent directory) under the new DLL.  The older DLLs since January
didn't create so-called "Creator Owner" and "Creator Group" inheritance
entries in the directory DACLs.  It's a bit hard to explain, but in
effect all native Windows processes created files within this directory
with a somewhat weird DACL due to the default inheritance rules.  Cygwin
processes didn't actually care for these entries so they were not
affected.

> As a Unix hacker I am somewhat mystified by this behavior.

The ACLs are somewhat different than POSIX ACLs and the inheritence
rules are, too.  Reading http://cygwin.com/1.7/cygwin-ug-net/ntsec.html
might help for a start.  If you are really interested in understanding
security settings in Windows, you will have to read the Windows docs,
though.  http://msdn.microsoft.com gives you access to lots of manual
pages and documentation.


Corinna

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

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