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 , bug-gnulib AT gnu DOT org, cygwin AT cygwin DOT com Subject: Re: symbolic link curiousity in 3.6.0 Message-ID: Mail-Followup-To: Bruno Haible , bug-gnulib AT gnu DOT org, cygwin AT cygwin DOT com References: <11037686 DOT 3WhfQktd6Z AT nimes> <7892953 DOT SKYDtnEIZr AT nimes> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Corinna Vinschen via Cygwin Reply-To: Corinna Vinschen Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" 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