The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Tony Finch <dot@dotat.at>
To: arnold@skeeve.com
Cc: tuhs@tuhs.org, doug@cs.dartmouth.edu
Subject: Re: [TUHS] Additional groups and additional directory permissions
Date: Fri, 2 Aug 2019 12:18:30 +0100	[thread overview]
Message-ID: <alpine.DEB.2.20.1908021139530.11612@grey.csi.cam.ac.uk> (raw)
In-Reply-To: <201908020835.x728ZUal026532@freefriends.org>

arnold@skeeve.com <arnold@skeeve.com> wrote:
> Arthur Krewat <krewat@kilonet.net>:
> > There's also the setgid bit on directories, that when files are created,
> > they will be in the group that the parent directory has on it.
>
> IIRC this was a Sun invention. It was in SunOS 4.x, and may even have
> been in SunOS 3.x.

When Bill Joy added the "multi-group stuff" to BSD all directories became
implicitly set-gid:

https://svnweb.freebsd.org/csrg/sys/ufs/ffs/ffs_inode.c?r1=4818&r2=5855

This is in SCCS revision 4.8 so I think it appeared in 4.2BSD

As I understand it, when group support was improved in System V they did
not change creat() to match BSD but instead used the directory set-gid bit
to provide opt-in BSD semantics. I don't know if this was in Solaris or
earlier?

> > Also, I don't think it's been mentioned, but there's the setuid bit on
> > directories - otherwise known as the sticky bit. When set, even if you
> > have rights to "write" the directory (meaning, delete files), you can't
> > delete those owned by other users. Useful for /tmp
>
> Also a SunOS invention, IIRC.

BSD again :-) SCCS revision 6.6 so I think it appeared in 4.3BSD

https://svnweb.freebsd.org/csrg/sys/ufs/ffs/ufs_lookup.c?r1=15809&r2=16046

Tony.
-- 
f.anthony.n.finch  <dot@dotat.at>  http://dotat.at/
Mull of Galloway to Mull of Kintyre including the Firth of Clyde and North
Channel: Variable 1 to 3, becoming easterly or southeasterly 2 to 4 later.
Smooth, occasionally slight at first in North Channel. Showers for a time near
shore. Good.

  reply	other threads:[~2019-08-02 11:42 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-01 12:35 [TUHS] Who's behind the UNIX filesystem permission Doug McIlroy
2019-08-01 16:22 ` John P. Linderman
2019-08-01 16:35   ` Arthur Krewat
2019-08-02  8:35   ` [TUHS] Additional groups and additional directory permissions arnold
2019-08-02 11:18     ` Tony Finch [this message]
2019-08-04  6:40       ` arnold
2019-08-02 12:45     ` Arthur Krewat
2019-08-02 13:06     ` Clem Cole
2019-08-02 13:28     ` Clem Cole
2019-08-02 19:00       ` Thomas Paulsen
2019-08-01 17:01 ` [TUHS] Who's behind the UNIX filesystem permission Nemo Nusquam
2019-08-01 18:26   ` Arthur Krewat
2019-08-01 20:14     ` Lyndon Nerenberg
2019-08-01 21:23 ` Dave Horsfall
2019-08-02 19:44 [TUHS] Additional groups and additional directory permissions Norman Wilson
2019-08-10  4:02 Kirk McKusick
2019-08-10  6:02 ` Thomas Paulsen

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=alpine.DEB.2.20.1908021139530.11612@grey.csi.cam.ac.uk \
    --to=dot@dotat.at \
    --cc=arnold@skeeve.com \
    --cc=doug@cs.dartmouth.edu \
    --cc=tuhs@tuhs.org \
    /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 NNTP newsgroup(s).