home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / volume.23 / text0080.txt < prev    next >
Encoding:
Text File  |  1991-06-15  |  1.1 KB  |  43 lines

  1. Submitted-by: ed@mtxinu.COM (Ed Gould)
  2.  
  3. >The problem, phrased in 1003.1's terms, is what happens if i am both
  4. >the owner and group of a file with mode 040; can I read it?
  5.  
  6. The traditional UNIX implementation of file permissions has
  7. been
  8.  
  9.     if owned by user
  10.         check owner bits
  11.     else if owned by user's group
  12.         check group bits
  13.     else
  14.         check other bits
  15.  
  16. Hence, if one owns a file *only* the owner bits matter.  The group
  17. bits apply only to non-owners in the group; the other bits apply
  18. only to non-owner non-group.  I don't know what 1003.1 says, though.
  19. Given its reliance on traditional UNIX, this is what I'd expect it
  20. to say.
  21.  
  22. The other reasonable interpretation I can imagine is
  23.  
  24.     if (owned by user and owner bits allow access) or
  25.        (owned by user's group and group bits allow access) or
  26.        (other bits allow access)
  27.         grant access
  28.     else
  29.         deny access
  30.  
  31. I'd bet small amounts of money that this latter interpretation
  32. doesn't conform to 1003.1.
  33.  
  34. -- 
  35. Ed Gould            No longer formally affiliated with,
  36. ed@mtxinu.COM            and certainly not speaking for, mt Xinu.
  37.  
  38. "I'll fight them as a woman, not a lady.  I'll fight them as an engineer."
  39.  
  40.  
  41. Volume-Number: Volume 23, Number 83
  42.  
  43.