From: Norton Allen <allen@huarp.harvard.edu>
To: cygwin@cygwin.com
Subject: Re: chmod g+s ineffective
Date: Wed, 29 Jun 2022 12:51:39 -0500 [thread overview]
Message-ID: <7964c08d-83cb-aab3-5d1c-4a5f0a86bf0a@huarp.harvard.edu> (raw)
In-Reply-To: <dd5e2750-5d86-0283-84fb-ef10efd4a8a0@huarp.harvard.edu>
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?
next prev parent reply other threads:[~2022-06-29 17:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-29 12:12 Norton Allen
2022-06-29 12:39 ` Andrey Repin
2022-06-29 14:18 ` Norton Allen
2022-06-29 17:51 ` Norton Allen [this message]
2022-06-30 23:56 ` Andrey Repin
2022-07-11 2:17 ` Chris Wagner
2022-07-11 2:33 ` Eliot Moss
2022-07-11 16:49 ` Norton Allen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7964c08d-83cb-aab3-5d1c-4a5f0a86bf0a@huarp.harvard.edu \
--to=allen@huarp.harvard.edu \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).