From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from forward502c.mail.yandex.net (forward502c.mail.yandex.net [IPv6:2a02:6b8:c03:500:1:45:d181:d502]) by sourceware.org (Postfix) with ESMTPS id 719DB3858C42 for ; Fri, 26 Apr 2024 07:35:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 719DB3858C42 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=yandex.ru Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=yandex.ru ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 719DB3858C42 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a02:6b8:c03:500:1:45:d181:d502 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714116907; cv=none; b=SR3vIT04yElfSGWUkboUM5AbE8uSgjYvWZLKZ+cOoR3/dC+/xfGPGDHEWA9riVOStSYP4bvZcJESGA0unYZPeRgJ0ccW3vABg0j6Lm6rYJ8Xxh3UNPgMzzHUTk0y0MB6b31cWes/eIE8k6XB+WtxOiMdNpCtqb3It/Rd/wh3oqE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714116907; c=relaxed/simple; bh=ujH9Ixogpr4sMM6e8+PIOapqXL3t3yizvA+aFyJMXv8=; h=DKIM-Signature:Date:From:Message-ID:To:Subject:MIME-Version; b=tK0esTXNzPkVQTAwdjRCrzeg7f75ULdl34X32AatcdwMLH8IasBtz49ZyngK6kWxglv8pzHq6wGXt6b6ZocJzZRS0O0ZSUtcwabesd6IU3t9gna1MmqHI1uwnEcpWICv9UC6e14caedo2c3vMWH0SUeuaqnG+YFNa3V2gdUgxZw= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from mail-nwsmtp-smtp-production-main-31.sas.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-31.sas.yp-c.yandex.net [IPv6:2a02:6b8:c08:de2c:0:640:e39b:0]) by forward502c.mail.yandex.net (Yandex) with ESMTPS id C08FD60AAC; Fri, 26 Apr 2024 10:35:01 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-31.sas.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id 0ZHtdtCYvOs0-x0s1ATdr; Fri, 26 Apr 2024 10:35:01 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1714116901; bh=0K+B9o/G2eqA7ITROkd0lT37BkN8ILJk8aAgVq+IRS4=; h=In-Reply-To:Subject:Date:References:To:Message-ID:Reply-To:From; b=sxQilFyEUAi3msyedqfHpkQ549FcDxlPk5EzxvIpGF8+5/BHeQdejT+FhIAajDqPO dmOPScnjRJyjDDK8AeTLkRfWay3TZJpGUX5LqzBfRY0ujMOxcyT9FKLM3i8+4bVLSD /0IrllhrD9KdTZAw7bNu6Djn1WQbzhFJAIxEBggo= Authentication-Results: mail-nwsmtp-smtp-production-main-31.sas.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Received: from [192.168.1.10] (HELO daemon2.darkdragon.lan) by daemon2 (Office Mail Server 0.8.12 build 08053101) with SMTP; Fri, 26 Apr 2024 07:25:02 -0000 Date: Fri, 26 Apr 2024 10:25:02 +0300 From: Andrey Repin X-Mailer: The Bat! (v9.3.4) Professional Reply-To: cygwin@cygwin.com Message-ID: <1331116259.20240426102502@yandex.ru> To: Christopher Layne , cygwin@cygwin.com Subject: Re: Issue with cygdrive mount, native symlinks, and noacl option In-Reply-To: <2AD67AA7-33D1-43FF-9543-20A687E0D4CC@anodized.com> References: <2AD67AA7-33D1-43FF-9543-20A687E0D4CC@anodized.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_THEBAT,NICE_REPLY_A,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS,TXREP,XM_LIGHT_HEAVY autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Greetings, Christopher Layne! > I noticed recently while attempting to rsync directories from one drive to > another that I was getting the familiar "NULL SID", "incorrectly ordered", > etc. type ownership issues on the destination even though I use noacl for > cygdrive mounts (I'm aware of the POSIX vs windows ACL issues, etc. hence > why I use "noacl" for cygdrive). I was able to track down the issue to a > specific combination of things that creates the problem: > 1. I have symlinks in / for each drive pointing to /cygdrive/[a-z] via ln -s /cygdrive/ /. Just make cygdrive prefix / in this case. Portable apps should use /proc/cygdrive/ regardless. > 2. All symlinks are actually native reparse points as a I run with > CYGWIN=winsymlinks:nativestrict by default. > Example: > clayne@sv590:/ $ ls -lad /[a-z] > lrwxrwxrwx 1 clayne None 11 Apr 24 12:24 /c -> /cygdrive/c > lrwxrwxrwx 1 clayne None 11 Apr 24 12:24 /e -> /cygdrive/e > lrwxrwxrwx 1 clayne None 11 Apr 24 12:24 /f -> /cygdrive/f > lrwxrwxrwx 1 clayne None 11 Apr 24 12:24 /s -> /cygdrive/s What is the actual symlink target? (not what is reported by Cygwin) > 3. I issue the rsync with something like: rsync -avSHP /f/some-dir/ /s/some-dir/ > The issue here is that it appears mount related options such as noacl are > evaluated differently when native symlinks are used. If I change the > destination to instead be "/cygdrive/s/dest/dir" then noacl works > appropriately. On top of all this, if I instead create the /s symlink as a > "cygwin" style symlink via CYGWIN=winsymlinks things also work correctly - > that is, the noacl option is used. What I would intuitively expect, atleast > within the context of acl vs noacl, is for the symlinks to be resolved first > and then mount options specific to the target resolved based off what the > symlink actually points to. In the native/nativestrict case, it appears to > be doing this in reverse and inheriting /'s standard default acl option > rather than /cygdrive's noacl option. > Footnotes on workarounds: > * I know how to workaround using the root-level symlinks in the first place > by just mounting cygdrive to /, but I'd have to update various scripts which > already use /cygdrive and I like having the "windows drives" self-contained > under /cygdrive (even though I frequently use the / level symlinks as shorthand). See the note above about portable apps. > * I also know how to avoid the issue entirely by using /cygdrive/ for > the destination but the underlying issue still seems like a bug or an > oversight to me, particularly given that nativestrict behaves differently > when it comes to evaluating mount options. See... > * Another workaround would be to use non-nativestrict symlinks but I want > to preserve interoperability with native windows applications outside of > cygwin and I've learned over the years to just avoid anything that isn't > nativestrict. I'm with you here. -- With best regards, Andrey Repin Friday, April 26, 2024 10:20:43 Sorry for my terrible english...