home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / sun / misc / 5857 < prev    next >
Encoding:
Internet Message Format  |  1992-12-15  |  1.8 KB

  1. Path: sparky!uunet!auspex-gw!guy
  2. From: guy@Auspex.COM (Guy Harris)
  3. Newsgroups: comp.sys.sun.misc
  4. Subject: Re: Directories, set-guid?
  5. Message-ID: <15915@auspex-gw.auspex.com>
  6. Date: 15 Dec 92 22:46:39 GMT
  7. References: <BzAH8n.3wn@fafnir.com>
  8. Sender: news@auspex-gw.auspex.com
  9. Organization: Auspex Systems, Santa Clara
  10. Lines: 31
  11. Nntp-Posting-Host: auspex.auspex.com
  12.  
  13. >What does a mode set-guid mean for a directory? I notice that our Sun
  14. >has most system directories, like /etc, set to mode 's' for group.  The
  15. >man pages say this is possible but is ignored.
  16.  
  17. Any SunOS 4.x man page that says that is incorrect.
  18.  
  19. A not-necessarily-obvious man page that *doesn't* say that is OPEN(2V):
  20.  
  21.      O_CREAT        If the file exists, this flag has no  effect.
  22.                     Otherwise, the file is created, and the owner
  23.                     ID of the file is set to the  effective  user
  24.                     ID  of the process.  The group ID of the file
  25.                     is set to either:
  26.  
  27.                     o  the effective group ID of the process,  if
  28.                        the  filesystem  was  not mounted with the
  29.                        BSD  file-creation  semantics  flag   (see
  30.                        mount(2V))  and  the  set-gid  bit  of the
  31.                        parent directory is clear, or
  32.  
  33.                     o  the group ID of the directory in which the
  34.                        file is created.
  35.  
  36. Other manual pages describing calls that create files should say much
  37. the same thing - i.e., that if the set-GID bit is set on a directory,
  38. creation of files in that directory follows 4.2andupBSD semantics for
  39. the group ID of the newly-created file, not "traditional UNIX"
  40. semantics.
  41.  
  42. You can, of course, get 4.2andupBSD semantics *without* that bit being
  43. set, if you mount with the "grpid" option.
  44.