public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Andrey Repin <anrdaemon@yandex.ru>
To: Norton Allen <allen@huarp.harvard.edu>, cygwin@cygwin.com
Subject: Re: chmod g+s ineffective
Date: Wed, 29 Jun 2022 15:39:52 +0300	[thread overview]
Message-ID: <792558531.20220629153952@yandex.ru> (raw)
In-Reply-To: <9c053381-4466-ea8a-11d6-ea2e676d3b35@huarp.harvard.edu>

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 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.

> 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?


-- 
With best regards,
Andrey Repin
Wednesday, June 29, 2022 15:36:50

Sorry for my terrible english...


  reply	other threads:[~2022-06-29 12:50 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 [this message]
2022-06-29 14:18   ` Norton Allen
2022-06-29 17:51     ` Norton Allen
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=792558531.20220629153952@yandex.ru \
    --to=anrdaemon@yandex.ru \
    --cc=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).