delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-Original-To: | cygwin AT cygwin DOT com |
Delivered-To: | cygwin AT cygwin DOT com |
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 | |
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 |
From: | Norton Allen <allen AT huarp DOT harvard DOT edu> |
To: | cygwin AT cygwin DOT com |
References: | <9c053381-4466-ea8a-11d6-ea2e676d3b35 AT huarp DOT harvard DOT edu> |
<792558531 DOT 20220629153952 AT yandex DOT ru> | |
<dd5e2750-5d86-0283-84fb-ef10efd4a8a0 AT huarp DOT harvard DOT edu> | |
In-Reply-To: | <dd5e2750-5d86-0283-84fb-ef10efd4a8a0@huarp.harvard.edu> |
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 | |
X-Content-Filtered-By: | Mailman/MimeDel 2.1.29 |
X-BeenThere: | cygwin AT cygwin DOT com |
X-Mailman-Version: | 2.1.29 |
List-Id: | General Cygwin discussions and problem reports <cygwin.cygwin.com> |
List-Archive: | <https://cygwin.com/pipermail/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-request AT cygwin DOT com?subject=help> |
List-Subscribe: | <https://cygwin.com/mailman/listinfo/cygwin>, |
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe> | |
Sender: | "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com> |
X-MIME-Autoconverted: | from base64 to 8bit by delorie.com id 25THqRR3029086 |
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 AT EAS-SOFTWAREE1B ~ $ ls -ld foo drwxrwxr-x 1 nort flight 0 Jun 29 06:25 foo nort AT EAS-SOFTWAREE1B ~ $ chmod g+s foo nort AT EAS-SOFTWAREE1B ~ $ ls -ld foo drwxrwxr-x 1 nort flight 0 Jun 29 06:25 foo nort AT 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? -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |