User`s guide
D - 2
K
A
DAK
KwikNet Administration Interface
User Access Rights
User access rights are formed from the logical OR of the following bit masks which are
defined in header file KN_ADMIN.H.
KN_ADM_ACC_READ Allow file read
KN_ADM_ACC_WRITE Allow file write
KN_ADM_ACC_REMOVE Allow file remove (delete)
KN_ADM_ACC_DIRSEL Allow directory traversal (selection)
KN_ADM_ACC_DIRLIST Allow directory listing
KN_ADM_ACC_DIRMK Allow directory make
KN_ADM_ACC_DIRRM Allow directory remove (delete)
KN_ADM_ACC_VISIBLE Allow file visibility
KN_ADM_ACC_FULL Allow full access (all of the above)
These access rights are used by optional KwikNet components, such as the FTP server, to
restrict a user's access to directories and files. Access right KN_ADM_ACC_DIRSEL is
required to be able to change directories. Most of the other access rights are self
explanatory.
The visibility right is special. If a user has access right KN_ADM_ACC_VISIBLE, then the
user will have full view of all files and directories. Without this access right, the user
will not be able to view files or traverse directories which are above the user's base
directory.
Customizing Administration Services
File KN_ADMIN.C defines several users. User anonymous with no password has read only
access to files and directories beginning at a base directory determined by the KwikNet
server making use of the user definitions. User KADAK with password KwikNet has full
access to all files from the root directory. You are free to alter these definitions to suit
your needs.
File
KN_ADMIN.C also includes a set of functions which are used by servers, such as the
KwikNet FTP server, to validate user names, passwords and access rights. Other functions
in the module validate directory path information if a file system is used. Strings of the
form ">>>>" identify functions in the file which may require modification. You can alter
these validation functions, if necessary, to meet the needs of your application.
After editing the file KN_ADMIN.C, you must build your KwikNet Library to incorporate the
revised module. Before building the
KwikNet Library, be sure to adjust the maximum user
name and password lengths (see Appendix D.2) to meet or exceed the lengths of the user
names and passwords in your user definitions.