delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2025/03/29/08:42:26

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 52TCgPJf802820
Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com
Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com
DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 52TCgPJf802820
Authentication-Results: delorie.com;
dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=YJw2gzWf
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 20CBF3856260
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1743252145;
bh=062F2wTNtMXB8KKC7X19pEXBBA7Q0XWg7X3luBodAJY=;
h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=YJw2gzWffX/TYAIMZeTfxUeIR2dX5pKP0Eq1ASBjRVNhLhurtNqwlq8S6ICObBkYi
Q2+LsZBRPPw1A6em3FKK9ga2Bu9mZDzOF0XrsC6P5iT9Jhy4xknrY+RpIzDJJLY9I/
XCU73lu3mWWpTpI0rys/wM3ke3dbT4uqKur+koSQ=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2302E3858C39
Date: Sat, 29 Mar 2025 13:41:25 +0100
To: Bruno Haible <bruno AT clisp DOT org>, bug-gnulib AT gnu DOT org, cygwin AT cygwin DOT com
Subject: Re: symbolic link curiousity in 3.6.0
Message-ID: <Z-fqdU-Q63HnGcdb@calimero.vinschen.de>
Mail-Followup-To: Bruno Haible <bruno AT clisp DOT org>, bug-gnulib AT gnu DOT org,
cygwin AT cygwin DOT com
References: <Pine DOT BSF DOT 4 DOT 63 DOT 2503250218240 DOT 74063 AT m0 DOT truegem DOT net>
<11037686 DOT 3WhfQktd6Z AT nimes> <Z-fINO05FlFrTIUs AT calimero DOT vinschen DOT de>
<7892953 DOT SKYDtnEIZr AT nimes> <Z-fjk7zghYvvNGW4 AT calimero DOT vinschen DOT de>
MIME-Version: 1.0
In-Reply-To: <Z-fjk7zghYvvNGW4@calimero.vinschen.de>
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Corinna Vinschen via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>

On Mar 29 13:12, Corinna Vinschen via Cygwin wrote:
> On Mar 29 12:43, Bruno Haible via Cygwin wrote:
> > OK, and what does this mean for the *files* created in such a directory?
> 
> Just for clarity, permissions in Windows are *always* defined by an ACL.
> There's no such thing as default POSIX perms.  Don't try to look at
> non-Cygwin-created files from a POSIX permission POV, it's a lost cause.
> 
> But your question was specificially about files created in the above
> dir:
> 
> - Files created by a Cygwin process inside that dir will have only the
>   usual three ACL entries constituting standard POSIX permission bits,
>   combined with their umask, i.e.:
> 
>   $ cd /tmp/glo1FkFx/tmpdir0
>   $ umask
>   22
>   $ touch foo
>   $ getfacl foo
>   # file: foo
>   # owner: corinna
>   # group: vinschen
>   user::rw-
>   group::r--
>   other::r--
> 
> - Files created by non-Cygwin processes inside that dir will have by
>   default(*) only the usual three ACL entries constituting standard
>   POSIX permission bits, but there's no umask handling in the non-Cygwin
>   process, i.e.
> 
>   $ cd /tmp/glo1FkFx/tmpdir0
>   $ cmd
>   C:\cygwin64\tmp\glQatIoG\tmpdir0>echo foo > bar
>   C:\cygwin64\tmp\glQatIoG\tmpdir0>exit
>   $ getfacl bar
>   # file: bar
>   # owner: corinna
>   # group: vinschen
>   user::rwx
>   group::r-x
>   other::r-x
> 
>   (*) Most Windows processes rely entirely on the permissions in
>   the ACLs and the Windows ACL inheritance rules.
> 
> Does that answer your question?
> [...]
> For non-Cygwin-generated files, there's no such thing as a standard ACL,
> and the Cygwin user, looking from the POSIX perspective when using it,
> should see the '+'-sign to notice this file has no POSIX permissions.

Erm... except for non-Cygwin-generated files created in a Cygwin-created
dir, as outlined in the above example, in which case the inherited
default permissions emulate POSIX permissions and acl_extended_file() on
them returns 0.

I wasn't sure this was clear from the example...


Corinna

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

- Raw text -


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