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

  1. Submitted-by: andrew@alice.att.com (Andrew Hume)
  2.  
  3.     While casually reading ISO 9660, I happened across the file permissions
  4. field for a file. This is some twisted person's idea of a joke but probably
  5. is the VMS permissions field. What was not specified was what happens
  6. if two different bits conflict (more on what i mean exactly below).
  7. ``Ha!!'', I said, ``1003.1 would have gotten that right!''
  8. Unfortunately, I couldn't find the explanation in 1003.1. Can someone help
  9. me out here?
  10.     The problem, phrased in 1003.1's terms, is what happens if i am both
  11. the owner and group of a file with mode 040; can I read it?
  12.     There are actually two problems. One is that 1003.1 defines
  13. bits and mentions words like read permission and masks but never actually says
  14. what the meaning of S_IRUSR (for example) is when it is set (or not).
  15. But let us pass over that and assume the wording should have been something 
  16. like:
  17.     If S_IRUSR is set, then the user whose ID == st_uid may read the file.
  18.     If S_IRUSR is not set, then the user whose ID == st_uid may not read 
  19.         the file.
  20. The second problem then arises; in this scenario, one clause says I may read
  21. and the other says I may not read. How do I break this conflict? Of course, in
  22. Unix (which after all is only distantly related to 1003.1), the access bits are
  23. interpreted or enforced as
  24.     1) if i am the owner, then the owner permissions apply.
  25.     2) otherwise, if i match the group, then the group permissions apply.
  26.     3) Otherwise, the other permissions apply.
  27. But I couldn't find words to that effect in 1003.1.
  28.  
  29.     Where should I be looking?
  30.  
  31.     andrew hume
  32.     andrew@research.att.com
  33.  
  34.  
  35. Volume-Number: Volume 23, Number 81
  36.  
  37.