X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 405623858C50 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1714116927; bh=CvH6cHE74/YXGuMK+aHHbaCymYBROzuFyOYxzeMJvBY=; h=Date:To:Subject:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=hXAgq24a3vdhomAsyP4MdD+xgc8iLU57moe6FbhAE1/eptxNsUNrznt/f7lLJt07G rPXqnf9nZCF8Hx894zb4JhXVOqoG2byMLErHtyz+24Ho0fOkB6zJFGsWOl5F3Rk+tT UstOcTAaZhL1c0po7q51hvBwiFSRwyzpjB9yW+xM= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 719DB3858C42 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 719DB3858C42 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 X-Yandex-Fwd: 1 Date: Fri, 26 Apr 2024 10:25:02 +0300 X-Mailer: The Bat! (v9.3.4) Professional Message-ID: <1331116259.20240426102502@yandex.ru> To: Christopher Layne , cygwin AT cygwin DOT 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 AT anodized DOT com> MIME-Version: 1.0 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 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: Andrey Repin via Cygwin Reply-To: cygwin AT cygwin DOT com Cc: Andrey Repin 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" 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 AT 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... -- 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