home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / protocol / permissions.txt < prev    next >
Text File  |  2020-01-01  |  2KB  |  56 lines

  1.  
  2. I.1. Format of System-Dependent File Permissions in A-Packets
  3.  
  4. The format of this field (the "," attribute) is interpreted according to the
  5. System ID ("." Attribute).
  6.  
  7. For UNIX (System ID = U1), it's the familiar 3-digit octal number, the
  8. low-order 9 bits of the filemode: Owner, Group, World, e.g. 660 = read/write
  9. access for owner and group, none for world, recorded as a 3-digit octal string.
  10.  
  11. For VMS (System ID = D7), it's a 4-digit hex string, representing the 16-bit
  12. file protection WGOS fields (World,Group,Owner,System), in that order (which
  13. is the reverse of how they're shown in a directory listing); in each field,
  14. Bit 0 = Read, 1 = Write, 2 = Execute, 3 = Delete.  A bit value of 0 means
  15. permission is granted, 1 means permission is denied.  Sample:
  16.  
  17.   r-01-00-^A/!FWERMIT.EXE'" 
  18.   s-01-00-^AE!Y/amd/watsun/w/fdc/new/wermit.exe.DV
  19.   r-02-01-^A]"A."D7""B8#119980101 18:14:05!#8531&872960,$A20B-!7(#512@ #.Y
  20.   s-02-01-^A%"Y.5!                                     ^^^^^^
  21.  
  22. A VMS directory listing shows the file's protection as (E,RWED,RED,RE) which
  23. really means (S=E,O=RWED,G=RED,W=RE), which is reverse order from the internal
  24. storage, so (RE,RED,RWED,E).  Now translate each letter to its corresponding
  25. bit:
  26.  
  27.   RE=0101, RED=1101, RWED=1111, E=0010
  28.  
  29. Now reverse the bits:
  30.  
  31.   RE=1010, RED=0010, RWED=0000, E=1101
  32.  
  33. This gives the 16-bit quantity: 
  34.  
  35.   1010001000001101
  36.  
  37. This is the internal representation of the VMS file permission; in hex:
  38.  
  39.   A20B
  40.  
  41. as shown in the sample packet above.
  42.  
  43. The VMS format probably would also apply to RSX or any other FILES-11 system.
  44.  
  45. I.2. Handling of Generic Protection
  46.  
  47. To be used when the two systems are different (and/or do not recognize or
  48. understand each other's local protection codes).
  49.  
  50. First of all, the book is wrong.  This should not be the World protection, 
  51. but the Owner protection.  The other fields should be set according to system
  52. defaults (e.g. UNIX umask, VMS default protection, etc), except that no
  53. non-Owner field should give more permissions than the Owner field.
  54.  
  55. (End of CKCPLM.DOC)
  56.