X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1A9D1383508F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1608850578; bh=sJ/xSH6vGu+vW9HSXYDccoFpHWditqYLcmrsVdIWun8=; 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=HjNnehGInseZn+Vot4wXJrOL4MSlTfsHw3n0bkovM80gdIS7hD9IIfEyZtC1VCF24 B/8lQ1QynU7tQBoQmW20txXG2fpyNze4l34iUD3SYJodN+y59jKcLioYhsfXHrDOgn ALY7jJuE55rkD3Dg8iYxZo3hx8rHAiRnWNCtz0RA= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D46F6384A026 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NDEeBzSfjSuad1oaJ1uHyBVXrmTvkBuBvFinLwm8S7cAIFDlyRSdDIKVcIUI10xn1g7wfu85JteBt9DEk159Xm4QCDW8/Rs5QiRAbbYeguAYqpo4vt9ZfpwP317zFUc775n31iJ7OVdY24RjwGqKQPEB91R0iUeMk+aPsSsLe7aYjpOaGn5RI3LXmQeWIigY0GI4KmbVdXPBeCZOonZemJyLEj3WhfTmOs04cJdEMctGIUX7XfQf00wB+gzo6yGUJkh9MA2BQn9gD5mS9A6uldZB3hJjBkjuMbxAO3RLXK3pnzv1CZgEtvsvXJjtyEmifmViHHHjjtOBPZ3CiIgv6A== 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=9Jm79uAuPZZxuVqrFiFveRZ+V3ufPQ+SQvR/jUzlYKs=; b=dZ2KscENrON5ZnjvVRNSl8Jn2epv+wQGg4flX4vkPoG6S6pzukpb2/VUQ8JtQaqT3xNm3Ir82LiP8kCucdg76C2HrUsUcfQqtfy7d1vmKj1KezfDdZvG2HXW+inWdQDjZue6A/fTPc51RRQoWBczXFfrHAzZ19b3RtWq0DlLyrYnuCjeZngiPunF9juE4Ou+7PcrvpItTOQCFKz+4GedUioU0CBGHcTshPbY4ZaW4etlreExdI0Jtg8lZJM5rqB/FyNKHiVGQbRG/uGvW2UTG/rzXghGfYTQTI93RAlT6xOwtj4ndfPeJmm5IjwyASDT0qZfzP1Zkrct5VnJ03Xd0Q== 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: chmod issue on 3.1.7. To: cygwin AT cygwin DOT com References: <7cb8ee6c7e9a36a3c1ee73def342bcb6 AT mail DOT kylheku DOT com> Message-ID: <4fe8b717-ada1-16b5-f739-7d43b2a4d56c@cornell.edu> Date: Thu, 24 Dec 2020 17:56:10 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 In-Reply-To: Content-Language: en-US X-Originating-IP: [65.112.130.200] X-ClientProxiedBy: BN6PR19CA0107.namprd19.prod.outlook.com (2603:10b6:404:a0::21) To MN2PR04MB6176.namprd04.prod.outlook.com (2603:10b6:208:e3::13) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [10.13.22.7] (65.112.130.200) by BN6PR19CA0107.namprd19.prod.outlook.com (2603:10b6:404:a0::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3700.27 via Frontend Transport; Thu, 24 Dec 2020 22:56:10 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fa0cbbfa-676d-4184-f6e5-08d8a85f1b99 X-MS-TrafficTypeDiagnostic: MN2PR04MB5632: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5236; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2U0e/KcRnKM9jLBVu8WJihhFWl0XAAsDphG6P6oMurZYHnzMPirUaHVrBiJFW9Y9D7I/uPGUBOygJT1z3DgrSLnu4bqsfY/cj3MbiMXXxoYI1LWCL6ogDpfFTYKlm/R6T4/WhmwCi1UE2mCsqnhbI5s+5zR1vqYp9wAmISz3ixzTsVhsYnfIwlCff+i4t69s90znJfUfomXT7wl0dblzufxmJTC2niuD6YinCCfZ7gHTvivYM65dgKV5x3OsXLxQJ2PT/PbSMBGT5jrJMuvYSnPMFW4gRFOri+yU0UO7sEzqXqMffdzQ12lbRoXkgOgin6Dc/HOqhK4QLBPEb67JGDvwvBDx2t9rRQkvArgTGqNR1Pqkza47GG+kUm+86GWqEfPSACszlLyen9fIkeuEdH3ij4SzRp6okaNpHl2OiiBNEQm34OYQfCarsIhcMtbAUodThr3rO3FMmFWkAaYTlxUe3k3cDbNsLVnj0YYEHXLQU57kWroojgxaAalttcEXh2y4Hus+JnXPGYIKUowMMzjv+RGsJyq3qTHk/5KXXAhw26dX0wYY4gwwJfRv1rQS 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)(39860400002)(376002)(396003)(366004)(346002)(136003)(16526019)(478600001)(4001150100001)(31696002)(86362001)(36756003)(83380400001)(6916009)(75432002)(16576012)(2906002)(66556008)(66946007)(31686004)(66476007)(956004)(26005)(52116002)(53546011)(316002)(2616005)(8936002)(8676002)(5660300002)(6486002)(186003)(966005)(786003)(7116003)(43740500002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: =?Windows-1252?Q?Iwxs6ssYVH7MgfrDfYzaaQ/2sY+MjnTTHG/puHGp6sBxA3C9QCJzL4YV?= =?Windows-1252?Q?DU1fTlTWwiGbxGCdXK2zKwFJ85h/OgFo3fgYlDXU2bGeUlY9yZomLF6Q?= =?Windows-1252?Q?tG1CGbKeud1myZW9CQRRDOGzBsmdsP5Fkb9OHIqGMOifhH3yrywJbMmv?= =?Windows-1252?Q?0tdHjBN/ucVDTRm/vLlHVrdxB9j85bFICL1AfB/+AVqF8k8RYzYbaNaa?= =?Windows-1252?Q?dshZYzRa8s0IWNVELo2WoaVmLVCUdlS/movWohVzUyAoFH92ZGTXH5Q7?= =?Windows-1252?Q?wJIGnmgr0vadDJKqNJFmfZSqz9hzEWC5Kay1OIHnTQj0JN6BnRfkmwWX?= =?Windows-1252?Q?93hcQMuROjPx4R1wll5BwNQb5zr8O803Nk6iOHRq4DIfYAl+530M8Hpp?= =?Windows-1252?Q?ksFsowjruNpAQ2zmyeodoSyd7N2koiwupjsn/DkVcjylE965dik6pJEE?= =?Windows-1252?Q?sES/g6MRkGzmPvRLZrEVAB2jkViJV2h8Dq1U3wp8OgMV97UXs/9m4El4?= =?Windows-1252?Q?xXABA2g2tn+uYB1FXq+zquuOrda9eVY6KSEYdzFJ2U4oWkIJeMrS8Rwc?= =?Windows-1252?Q?7mprC2e8zJvvhRQvTScAIhDGW7SIJRIfWzBupaQ3HWYm6FcwcZEog2bC?= =?Windows-1252?Q?jS18NBTZBs9ft1qSZ3XSqej81j5mxvsG9OPds1GhgH0W18whwS3hIH5h?= =?Windows-1252?Q?Cvo0l/6Xcd5IvF760Ot5VD9E41S0LmQFVxi0FySKHC8zfmS4fzpQSnfI?= =?Windows-1252?Q?ZXlLf+sfAxkBmCncmSUyHHs5wCL+ooXsIJZboecgfA9jMY7dkFZQE+fB?= =?Windows-1252?Q?N0D5+ztQVbzn387oC7Fllyn3jfhHJwsUoN8BRXQ+aiiqOKTF/EJKuoEz?= =?Windows-1252?Q?ZVB5qgxTk4qRBoj1Nrx/eml7i/ipgeuNLG6ovNjUsPPu+eOrUovIGkT8?= =?Windows-1252?Q?2M22NAz+QrLA3MWUpMGAfC2gCxB/o9FFa5GrQMMYOcYrIwEUnjVfdYAl?= =?Windows-1252?Q?6D+BPSJkTUSEWowWx+H93Smqa1VIeoS4GzB16PHqP2fuQnVHDuvJP3lt?= =?Windows-1252?Q?8f0z9bFNRmofdqtn?= X-OriginatorOrg: cornell.edu X-MS-Exchange-CrossTenant-AuthSource: MN2PR04MB6176.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Dec 2020 22:56:11.0650 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 5d7e4366-1b9b-45cf-8e79-b14b27df46e1 X-MS-Exchange-CrossTenant-Network-Message-Id: fa0cbbfa-676d-4184-f6e5-08d8a85f1b99 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: CDjIsIStdIOOKovqDb6yCyx5vg9NdSli4L6t/C2jV7oq5zApvFbUmXRJ846q4qckwyWfT7J1iLemxjLmEGTlUw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR04MB5632 X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_INVALID, DKIM_SIGNED, KAM_DMARC_STATUS, MSGID_FROM_MTA_HEADER, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, 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-Type: text/plain; charset="windows-1252"; Format="flowed" Errors-To: cygwin-bounces AT cygwin DOT com Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id 0BOMuiMv020418 On 12/24/2020 4:13 PM, Kaz Kylheku (Cygwin) via Cygwin wrote: > On 2020-10-10 09:32, Kaz Kylheku (Cygwin) via Cygwin wrote: >> Hi all, >> >> Running this Cygwin on a Windows 10 system: >> >>   0:DESKTOP-K8055OB:~$ uname -a >>   CYGWIN_NT-10.0-WOW DESKTOP-K8055OB 3.1.7(0.340/5/3) 2020-08-22 19:03 >> i686 Cygwi >> >> When a file is created, and permissions set as follows: >> >>   0:DESKTOP-K8055OB:~$ touch tempfile >>   0:DESKTOP-K8055OB:~$ chmod 03777 tempfile >>   0:DESKTOP-K8055OB:~$ ls -l tempfile >>   -rwsrwsrwt 1 kaz kaz 0 Oct 10 08:59 tempfile >> >> Then "chmod u=" is not able to clear the owner's permissions to nothing: >> >>   0:DESKTOP-K8055OB:~$ chmod u= tempfile >>   0:DESKTOP-K8055OB:~$ ls -l tempfile >>   -rwxrwsrwt 1 kaz kaz 0 Oct 10 08:59 tempfile >> >> As you can see, it has no effect. The expected value is ----rwsrwt. >> >> I tried both with 64 and 32 bit Cygwin: same deal. >> >> This is not a problem with the chmod utility.  I ran into this as a failing >> test case against a chmod library function in a programming language. >> >> http://www.kylheku.com/cgit/txr/tree/tests/018/chmod.tl >> >> The test cases pass until the "u=", which fails in the same way. >> This does not use the chmod utility. >> >> It's an issue with the chmod system call. >> >> This used to work on my older Cygwin installation, which was around 2.5. > > Anyone have a clue about this issue? > > $ icacls tempfile > tempfile NULL SID:(DENY)(Rc,S,RD,WD) >          BLACKBOX\kaz:(F) >          BLACKBOX\kaz:(RX,W) >          Everyone:(RX,W) > > $ getfacl tempfile > # file: tempfile > # owner: kaz > # group: kaz > # flags: -st > user::rwx > group::rwx > other::rwx > > $ ls -l tempfile > -rwxrwsrwt 1 kaz kaz 0 Dec 24 13:09 tempfile > > $ chmod u= tempfile > $ ls -l tempfile > -rwxrwsrwt 1 kaz kaz 0 Dec 24 13:09 tempfile Could the problem be that the owner and group are the same? You can do that on unix, but I'm not sure the Windows security model allows it. For example, what happens when you remove permissions of the owner kaz while retaining the permissions of the group kaz? As far as Windows is concerned, you're talking about BLACKBOX\kaz in both cases, I think. 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