X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3013C385481B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1604853581; bh=pN1fLEoroVd9n1D24m59v78rDY/RtxS6/lfAjVXaQ7g=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=UBmX6xXdxO4lfVufBVOa6B9yn7FdGvYuBe+3gc2/RaB0IJxsNRqbP8ILsbdTyF+Vy YFq3hjl5MPQROqkzhC9Eeu4EWmQ3jlYh5nX0iUQTXUn4ts4cPkrqrLxtpjXQcd9Qxc 4hF4IQL0Lim6VczSMxBDq0b/mBzpRlsGaTPzsLd0= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 76F343857C4C ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OfpeB8JVl3PX6KpetDBFdIwdV9NDLcYIoGxVjnxhb1yJcjbSMtoIvAjFxK33EjJFca2s/pXCKsL+XwJFn5lQZX4dYh8MfPUcq8b4lPC7qE9DOU2iUuEDFP4un3cbk40Vm0wls614psyIN02xqNy8vZwuFUS0ISxVLjYM+0+ItC4tIDTWdXCcaT9w97J4oEic0I3JtLnJaKDdTM/IeVe4TkdZH3lVUYAet2VQ2SEUZsRBjlufM/UbD4MEZarxqyBj0e+pk+IKWMjSHvSPnd+fSA55HFA/uUctj9jd7R9QG3POE2pfkhQdoZW/y1Hx2aGeh8DvRg5fkhA5jsSXDLVjfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lKXiAHf+pAcYP+eua5kOpJquT5cc19PNZUKJvU5z6Ic=; b=G4SpOTVTlMijWrXwcKUNEaRS1ibgRIHTaokB6LIAyvTIZKB2laWZqo+RqP5nfqLLRyQaheuC2VrpaFNQemBmQGe1lcRRbvImEYjCHz4iqKFr7FkvcGqmgaVd3kZ+KcNFhX6cOo/AZIVDvAQXiGwbuEj1zfi8gAsKtRn6DwR2N5q0NDkc6sBWWsmvUcAjuRPeLYqZpYOEWyUFftfe7+P//JWFku3zl7LVgRtr8wQRgKBlwdj4uLmjjyRwS7cUuHCN1aWQllK5m9lLnMLw5JaemkCLOE2aaqGLo1dY1yDJQJpGQ+rb8tEXveTlFfvg+eAdODpyJbPI5FczFgJNa/hTqQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cornell.edu; dmarc=pass action=none header.from=cornell.edu; dkim=pass header.d=cornell.edu; arc=none Subject: Re: Strange paths in NTFS reparse points created by Cygwin Setup for e.g. TTF fonts To: Michael Soegtrop , cygwin AT cygwin DOT com, L A Walsh References: <245e2446-8c1e-cbaa-a4ad-215d7e766274 DOT ref AT yahoo DOT de> <245e2446-8c1e-cbaa-a4ad-215d7e766274 AT yahoo DOT de> Message-ID: Date: Sun, 8 Nov 2020 11:38:50 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.4.1 In-Reply-To: Content-Language: en-US X-Originating-IP: [68.175.129.7] X-ClientProxiedBy: CH2PR18CA0018.namprd18.prod.outlook.com (2603:10b6:610:4f::28) To MN2PR04MB6176.namprd04.prod.outlook.com (2603:10b6:208:e3::13) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.0.17] (68.175.129.7) by CH2PR18CA0018.namprd18.prod.outlook.com (2603:10b6:610:4f::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.27 via Frontend Transport; Sun, 8 Nov 2020 16:39:34 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 35ecd438-84c5-4393-6be3-08d88404e00b X-MS-TrafficTypeDiagnostic: MN2PR04MB5870: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9WXnK0a4RjZ7x9+TwYnTCjDHFOjVYsaU8Pli/Uh5VUkAxx+V9qdfH9HyyFHGsZA6i2gbb9Hk6Ni9kPXCbvpcAgiwYdUWl5cYk1iC65CsWhpsGVamvPD/89/0XBMiV6Tsk8Vi6itxGCoxQfJFquIqyj13Isi+cKd1kxTtCxij0VbyvXH8ilmYg7xaEO1HQND30KO2BOYq3dgOs0m4p6EEk7Vu02KLfpo1oc0GLUa3F3V2w52puDfJXIpEhwddXHX5WzxfaFkUKDp6xzCeWXz+p/Nm5saRDqc3y9fKvbK+T6nxwV2KSFAKEzBibRLxkQ1cybaKqqlF+5/Ovwbes2J1OKvuuQkcRZ5fd4r/SMX6ECNvYBOifaJT52nM0kWiZlsy X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR04MB6176.namprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(136003)(396003)(39860400002)(346002)(376002)(8936002)(75432002)(956004)(6666004)(16576012)(316002)(786003)(110136005)(16526019)(2616005)(8676002)(53546011)(86362001)(36756003)(186003)(83380400001)(66476007)(66556008)(31696002)(52116002)(6486002)(45080400002)(478600001)(2906002)(31686004)(26005)(66946007)(5660300002)(43740500002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: ntzDzTaIT2UkLUxWaQBPMQA0QeNlL6gGjPoPuRnga2JNtx75mluc1Ony1Bw39hckAQdRPQjJYXueZGTa8fMhCamY1DQjKf2ca2E/2ikYhElX1kig7Ndz17LCxRRkm1iTqDSTdRaJV9VX2z1YQm/QwM3uhk7V/oFrFIL5mdpjYUwjkPHwkg0EZxtEvGfhv5fhdLv/HFBVc2Rah2xF5OMXkEDEXFI1G1F5KT7VWex3V3VZTRHEavYCj1ELjexV9mTs39hBj4so41gUBKRTDiUXCujJlykXCEEJ2rKLa055hylm1CVe8sVodYaAdQq9RDafEMi703zu90hcp9RDElz6Wc/GZHNrUmzsnRSL7dbsTcRcAnkG7UYs89Ln2UKzZ2PKz1UsjziK7fhX5z7dBd36fnoDhCfF8yRDKocmfXWMN1BOcIpnE1wIlNB/QbVVPWsYuElY8Ky7fb5BD3+TbQdx3NgYJbvc7JuDnRgl9NKgkWAFT2HemEipP6rHQWroBfMQAc50x3g5aD2QUXv1pXZYNmdb6WElo/56vmkvupVHW7GriY9haY1ZGR6puMENpf0LrUpZtf72EMUcuuzz6HRjdkQDY2NFZ/9gQ9mwAMxIM/hAwYWIJiQR5nwMh8UnEkmlBiyc8fOb5PnA6ZI7/I+rqA== X-OriginatorOrg: cornell.edu X-MS-Exchange-CrossTenant-Network-Message-Id: 35ecd438-84c5-4393-6be3-08d88404e00b X-MS-Exchange-CrossTenant-AuthSource: MN2PR04MB6176.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Nov 2020 16:39:34.9863 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 5d7e4366-1b9b-45cf-8e79-b14b27df46e1 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: /6mjcsl8F2co0eMjTUPqPk5h3ej1ZVzYVZaP8VqyERYHf+yeon7CSkLFgjeeVdnzehm5HDlq2INQQrM2fFTNOA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR04MB5870 X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, JMQ_SPF_NEUTRAL, MSGID_FROM_MTA_HEADER, NICE_REPLY_A, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Ken Brown via Cygwin Reply-To: Ken Brown Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: cygwin-bounces AT cygwin DOT com Sender: "Cygwin" On 11/8/2020 9:40 AM, Michael Soegtrop wrote: > Why shouldn't I be able to remove symlinks with rm -rf from within a cygwin? As > far as I understand the standard behavior of "rm" is to remove the symlink and > not its target. What I do when I remove a cygwin installation in our CI is an > "rm -rf" from a different cygwin installation. As I said in most cases this > works but rarely it doesn't. [...] > I understand that the contents / path of the symlink is as expected, so I am > looking out for other oddities which could explain this behavior. I've seen this behavior only in the following situation. Suppose you create a symlink in one Cygwin installation that uses WSL symlinks. Then you try to delete it from a different Cygwin installation with version < 3.1.5 (which is when WSL symlinks were first supported). This will fail, because the older Cygwin installation will see a reparse point of a type that it doesn't recognize. From what you say, it sounds like this doesn't apply to your situation, so I'm at a loss to explain it. Do you get any error message when you're unable to delete a symlink in one Cygwin installation from another? If not, you could try running 'rm /usr/share/fonts/microsoft/wingding.ttf' under strace to see if that give you any clues. You could also try 'file', 'ls -l', 'stat', etc., to see if Cygwin is correctly recognizing the file as a symlink. For example, I have a Cygwin installation in C:\cygwin64test. From a different Cygwin installation in which C: is mounted on /c, I see the following: $ file /c/cygwin64test/usr/share/fonts/microsoft/wingding.ttf /c/cygwin64test/usr/share/fonts/microsoft/wingding.ttf: symbolic link to /c/Windows/Fonts/wingding.ttf Now I remove that symlink under strace: $ strace -o strace.out rm /c/cygwin64test/usr/share/fonts/microsoft/wingding.ttf In the file strace.out I see 57 26112 [main] rm 39456 symlink_info::check: 0x0 = NtCreateFile (\??\C:\cygwin64test\usr\share\fonts\microsoft\wingding.ttf) 100 26212 [main] rm 39456 symlink_info::check: 29 = symlink.check(C:\cygwin64test\usr\share\fonts\microsoft\wingding.ttf, 0xFFFFB680) (mount_flags 0x4008, path_flags 0x10) 26 26238 [main] rm 39456 path_conv::check: this->path(C:\cygwin64test\usr\share\fonts\microsoft\wingding.ttf), has_acls(1) 25 26263 [main] rm 39456 _unlink_nt: Trying to delete \??\C:\cygwin64test\usr\share\fonts\microsoft\wingding.ttf, isdir = 0 218 26481 [main] rm 39456 _unlink_nt: \??\C:\cygwin64test\usr\share\fonts\microsoft\wingding.ttf, return status = 0x0 33 26514 [main] rm 39456 unlink: 0 = unlink(/c/cygwin64test/usr/share/fonts/microsoft/wingding.ttf) In your case I would expect to see some errors reported when you are unable to remove the symlink. Ken -- 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