From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from endymion.arp.harvard.edu (mercury.arp.harvard.edu [140.247.179.71]) by sourceware.org (Postfix) with ESMTPS id 459043853560 for ; Wed, 29 Jun 2022 14:18:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 459043853560 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=huarp.harvard.edu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=huarp.harvard.edu Received: from [192.168.22.252] (wsip-70-167-49-51.ks.ks.cox.net [70.167.49.51]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by endymion.arp.harvard.edu (Postfix) with ESMTPSA id D09A826CFED for ; Wed, 29 Jun 2022 10:18:28 -0400 (EDT) Message-ID: Date: Wed, 29 Jun 2022 09:18:24 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: chmod g+s ineffective Content-Language: en-US To: cygwin@cygwin.com References: <9c053381-4466-ea8a-11d6-ea2e676d3b35@huarp.harvard.edu> <792558531.20220629153952@yandex.ru> From: Norton Allen In-Reply-To: <792558531.20220629153952@yandex.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham 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@cygwin.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: , X-List-Received-Date: Wed, 29 Jun 2022 14:18:31 -0000 On 6/29/2022 7:39 AM, Andrey Repin wrote: > Greetings, Norton Allen! > >> On one machine I have, chmod g+s fails to set the sticky bit. The command >> does not return any error, but ls -l continues to show the bit not set. >> $ mkdir foo >> $ chgrp flight foo >> $ chmod g+ws foo >> $ ls -ld foo >> drwxrwxr-x+ 1 nort flight 0 Jun 29 06:50 foo > ----------------^ > > $ getfacl foo I will collect this shortly, but IIRC, getfacl showed it was not set. I did see it set there under 'flags' on the system that works. > >> I ran strace, and it looks like the correct system call parameter is getting passed. >> I am curious as to how the sticky bit is implemented. > First see if it was set or not. > >> It isn't obvious what underlying Windows functionality (if any) is applied. > It does. But the big question is, where do you try to do that. > If this is inside Cygwin installation root, then things could work more or > less POSIX'y. If this is outside Cygwin root (f.e. in your system profile), it > may or may not work completely, depends how did you mount /cygdrive prefix. I will confirm (shortly), but I'm pretty sure these tests were done under vanilla /home (so c:\cygwin64\home) > >> Ah, just checked on a system where this works, and creating a file in the >> directory from the >> command shell does not set the group, so presumably this functionality is >> all within cygwin. That works for my application, except when it doesn't. >> Any suggestions on what I should look for? > Look if you could avoid using +s. Isn't DACL enough? Am I correct that DACL is not available unless I am on a domain? This is for a field computer, so connection to a domain is generally more problematic than helpful.