home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat4 / acl.z / acl
Encoding:
Text File  |  2001-04-17  |  6.7 KB  |  199 lines

  1.  
  2.  
  3.  
  4. aaaaccccllll((((4444))))                                                                  aaaaccccllll((((4444))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      acl - Access Control Lists
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////aaaaccccllll....hhhh>>>>
  13.  
  14. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  15.      Access Control Lists (ACLs) are supported on XFS file systems only.
  16.  
  17.      ACLs provide a mechanism for finer grained access control than the
  18.      traditional UNIX discretionary access control mechanism.  An ACL is a
  19.      list of users and/or groups and their access rights, which is associated
  20.      with a file or directory.  ACLs are optional.  In addition to the ACL
  21.      used to mediate access, a directory may have a second ACL which defines
  22.      the default initial ACL for files created in that directory.  Files have
  23.      only the single access control ACL.
  24.  
  25.      At the interface to the library routines, ACLs are represented in a
  26.      _s_t_r_u_c_t _a_c_l which is defined in <_s_y_s/_a_c_l._h>.
  27.  
  28.               #define ACL_MAX_ENTRIES 25
  29.  
  30.               typedef ushort  acl_perm_t;
  31.               typedef int     acl_type_t;
  32.               typedef int     acl_tag_t;
  33.  
  34.               struct acl_entry {
  35.                    acl_tag_t       ae_tag;
  36.                    uid_t           ae_id;
  37.                    acl_perm_t      ae_perm;
  38.               };
  39.               typedef struct acl_entry * acl_entry_t;
  40.  
  41.               struct acl {
  42.                    int                     acl_cnt;
  43.                    struct acl_entry        acl_entry[ACL_MAX_ENTRIES];
  44.               };
  45.  
  46.  
  47.      This is a fixed size structure with a variable number of active _s_t_r_u_c_t
  48.      _a_c_l__e_n_t_r_y entries.  The maximum number of entries is _A_C_L__M_A_X__E_N_T_R_I_E_S
  49.      which is currently defined to be 25.  The number of active entries is
  50.      indicated in _a_c_l__c_n_t.
  51.  
  52.      A _s_t_r_u_c_t _a_c_l__e_n_t_r_y consists of three fields, _a_e__t_a_g, which identifies the
  53.      type of the entry, and is one of the following values (all other values
  54.      are invalid):
  55.  
  56.      _A_C_L__U_S_E_R__O_B_J (0x01)
  57.                     access permissions for the file's owner.
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. aaaaccccllll((((4444))))                                                                  aaaaccccllll((((4444))))
  71.  
  72.  
  73.  
  74.      _A_C_L__U_S_E_R (0x02)
  75.                     access permissions for a user other than the owner.
  76.  
  77.      _A_C_L__G_R_O_U_P__O_B_J (0x04)
  78.                     access permissions for users with the same group as the
  79.                     file's group
  80.  
  81.      _A_C_L__G_R_O_U_P (0x08)
  82.                     access permissions for other groups
  83.  
  84.      _A_C_L__M_A_S_K (0x10)
  85.                     mask entry
  86.  
  87.      _A_C_L__O_T_H_E_R__O_B_J (0x20)
  88.                     other entry.
  89.  
  90.                     The _a_e__i_d field of _s_t_r_u_c_t _a_c_l__e_n_t_r_y specifies the UID or
  91.                     GID for the entry.  The _a_e__p_e_r_m field specifies the
  92.                     permissions using the following defined values:
  93.  
  94.      _A_C_L__R_E_A_D (0x04)
  95.                     read access permitted
  96.  
  97.      _A_C_L__W_R_I_T_E (0x02)
  98.                     write access permitted
  99.  
  100.      _A_C_L__E_X_E_C_U_T_E (0x01)
  101.                     execute (search for directories) access permitted
  102.  
  103.      As with the basic permissions for a file, these may be or'ed together.
  104.  
  105.      Two types of ACLs are defined. _A_C_L__T_Y_P_E__A_C_C_E_S_S (0) indicates that the ACL
  106.      is to be used in making access control decisions for the file or
  107.      directory with which it is associated.  _A_C_L__T_Y_P_E__D_E_F_A_U_L_T (1) indicates
  108.      that the ACL is a default ACL.  Default ACLs are associated only with
  109.      directories, and supply the initial ACL for a file created in that
  110.      directory. Note that file-creation mode masks may effect the ACLs of
  111.      files created as a result of using directory default ACLs (see _u_m_a_s_k(1)).
  112.      ACLs are supplied using the _a_c_l__g_e_t__f_i_l_e(3c) and _a_c_l__s_e_t__f_i_l_e(3c) calls.
  113.  
  114. EEEEXXXXTTTTEEEERRRRNNNNAAAALLLL RRRREEEEPPPPRRRREEEESSSSEEEENNNNTTTTAAAATTTTIIIIOOOONNNN
  115.      ACLs are represented in a standard format for human readable input /
  116.      output.  Each ACL entry is specified as three colon separated fields.
  117.      ACL entries are separated by white space or new lines. Everything after a
  118.      "#" character is considered a comment and is ignored to the end of the
  119.      line.  The first field of an ACL entry is the entry type, which can be
  120.      one of the following:  "user", "group", "other", "mask", "u", "g", "o",
  121.      "m".
  122.  
  123.      The second field is a user name, numeric UID, group name, or numeric GID,
  124.      depending on the value of the first field.  (_a_c_l__f_r_o_m__t_e_x_t(3c) supports
  125.      only the strings, not the numeric UID/GID values.)  If the second field
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. aaaaccccllll((((4444))))                                                                  aaaaccccllll((((4444))))
  137.  
  138.  
  139.  
  140.      is empty, it implies that the ACL entry is for the owning user or group
  141.      of the file.  Mask and other entries must have an empty second field.
  142.      The third field is the discretionary access permissions for this ACL
  143.      entry.  This may be represented in two forms.  The first is the string
  144.      "rwx" where each letter may be replaced by a "-" indicating no access of
  145.      that type.  The parsing of this string by _a_c_l__f_r_o_m__t_e_x_t(3c) requires that
  146.      it be exactly as shown and not be reordered, e.g. rxw is not valid.
  147.  
  148.      Some programs allow a second form, the relative symbolic form (used for
  149.      input).  The relative symbolic form is preceded by a ``+'' to indicate
  150.      additional access or a ``^'' to indicate that access is to be removed,
  151.      similarly to the inputs to the _c_h_m_o_d(1) command.  The relative symbolic
  152.      string is at least one character.  The symbolic string contains at most
  153.      one each of the following characters in any order: "r", "w", and "x".
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.