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 EE8C53856269 for ; Wed, 29 Jun 2022 17:51:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EE8C53856269 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.41.185] (unknown [24.225.23.156]) (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 721FC26CFED for ; Wed, 29 Jun 2022 13:51:45 -0400 (EDT) Message-ID: <7964c08d-83cb-aab3-5d1c-4a5f0a86bf0a@huarp.harvard.edu> Date: Wed, 29 Jun 2022 12:51:39 -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 From: Norton Allen To: cygwin@cygwin.com References: <9c053381-4466-ea8a-11d6-ea2e676d3b35@huarp.harvard.edu> <792558531.20220629153952@yandex.ru> In-Reply-To: X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00, BODY_8BITS, HTML_MESSAGE, 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 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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 17:51:47 -0000 On 6/29/2022 9:18 AM, Norton Allen wrote: > 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. nort@EAS-SOFTWAREE1B ~ $ ls -ld foo drwxrwxr-x 1 nort flight 0 Jun 29 06:25 foo nort@EAS-SOFTWAREE1B ~ $ chmod g+s foo nort@EAS-SOFTWAREE1B ~ $ ls -ld foo drwxrwxr-x 1 nort flight 0 Jun 29 06:25 foo nort@EAS-SOFTWAREE1B ~ $ getfacl foo # file: foo # owner: nort # group: flight user::rwx group::rwx other::r-x > > >> >>> 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) Confirmed (as shown above). Tested in /home/nort on directory /home/nort/foo > > >> >>> 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. > So is this implemented using DACL under the hood? And is that expected to fail without a domain?