Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper Tools . Book 4-Appendices - <b>nnetmaxrgh()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 NNETMAXRGH()
 Sets or queries the maximum and inherited rights for a directory
------------------------------------------------------------------------------
 Syntax

     NNETMAXRGH([<cPath>],[<nRights>|<cRights>]) --> nRights

     Netware: 2.2 and 3.11

 Arguments

     <cPath>  Designates a directory or a file (only Netware 3.x) of
     which the maximum (Netware 2.x) or the inherited (Netware 3.x) rights
     are set or queried.  If no value is passed for <cPath>, the maximum or
     inherited rights for the current directory are determined.

     <cRights>  Designates a character string that contains the rights
     for the new directory in form of symbols (maximum rights under Netware
     2.x, inherited rights under Netware 3.x).  If no value is passed for
     <cRights> or <nRights>, the rights for <cPath> are not modified.

     <nRights>  Designates a numeric value that contains a bit mask for
     the determination of the rights for the new directory (maximum rights
     under Netware 2.x, inherited rights under Netware 3.x).  If no value is
     passed for <cRights> or <nRights>, the rights for  <cPath> are not
     modified.

 Returns

     NNETMAXRGH() returns the maximum rights (Netware 2.x) or the inherited
     rights (Netware 3.x) for <cPath>.

 Description

     NOVELL NET MAXIMUM RIGHTS
     Under Netware 2.x, NNETMAXRGH() allows you to set or query the maximum
     rights for a directory.  The maximum rights are the rights a user can be
     granted for a directory.  The maximum rights cannot be exceeded even if
     additional trustee rights are defined for a user.  To query the rights,
     do not pass a value for <cRights>|<nRights>.

     Rights can be set by passing a character string whereby each character
     indicates an attribute (<cRights>), or by passing a numeric value that
     results from a bitwise OR operation of the binary significance  of the
     attributes (nRights).  The maximum rights are coded as follows:

     Table 23.8:  Rights Coding under Netware 2.x
     ------------------------------------------------------------------------
     Bit     Definition     Description
     ------------------------------------------------------------------------
     1       READ           Read files
     2       WRITE          Write files
     3       OPEN           Open files
     4       CREATE         Create new files
     5       DELETE         Delete files
     6       PARENTAL       Create new directories
     7       SEARCH         Search files in directories
     8       MODIFY         Modify files or attributes
     ------------------------------------------------------------------------

     The symbols for <cRights> correspond to the first letter of each keyword
     under "Definition" in the above table.  Individual rights of the return
     value can be checked with ISBIT().

     Under Netware 3.x, NNETMAXRGH() allows you to set or query the inherited
     rights for a directory as well as for individual files.  The inherited
     rights determine which trustee rights a directory or a file inherits
     from a parent directory, as long as a user has not been explicitly
     granted trustee rights for the directory or file.

     Under Netware 3.x, the rights are coded as follows:

     Table 23.9:  Rights Coding under Netware 3.x
     ------------------------------------------------------------------------
     Bit     Definition     Description
     ------------------------------------------------------------------------
     1       READ           Read files
     2       WRITE          Write to files
     3       RESERVED
     4       CREATE         Create new files
     5       ERASE          Delete files
     6       ACCESS CONTROL Trustee rights can be modified
     7       FILE SCAN      Search files in directories
     8       MODIFY         Modify files or attributes
     9       SUPERVISORY    All rights / can grant rights
     ------------------------------------------------------------------------

     The first letter of each keyword under "Definition" represents the
     symbol for <cRights>.

 Note

     .  For detailed information about rights and security, see the
        Novell documentation.

 Examples

     .  Query the rights for the directory L:DATA:

        nRights=NNETMAXRGH('L:DATA')
        IF NNETVER('L:')<'3'
           ? 'Maximum rights:',nRights
        ELSE
           ? 'Inherited rights:',nRights
        ENDIF

     .  Set the rights for the directory VOL1:DATA/APRIL:

        IF NNETVER()<'3'
           NNETMAXRGH('VOL1:DATA/APRIL','RWOCDPSM')
        ELSE
           NNETMAXRGH('VOL1:DATA/APRIL','RWCEFM')
        ENDIF

See Also: NNETMKDIR()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson