This document describes configuration file of the gridftp server (gridftpd). 
The main configuration idea is mostly similar to wuftpd, but is simpler 
and mostly user subject based.


  Configuration file for the gridftp server (GFS) is plain text file.
  Line can be empty. Line can comment if it has # symbol at the beginning.
Or line is a command in all other cases. Comamnds and arguments are 
separated by blank spaces (space or tab symbol). If argument contains 
space or tab as it's part it should be escaped with backslash. For example
   this\ is\ one\ argument
Backslashes should also be escaped.
  Command is first word in the line. Some commands take only one line.
Some others can take few lines (block). End of block is marked by 
only word 'end' on the line. Nesting of blocks is not supported.
Configuration file is processed for every connected usersequentially
from top to bottom.
  Following commands are supported:

pluginpath path - specifies path to the directory, where data access
    plugins are put. Only one path can be specified. Only last command
    is effective.

group name - defines group of user and gives them the name 'name'. Users
    are specified by their subjects. This is block command. It is followed
    by list of subjects, one per line and is finished by 'end'. Each 
    subject can belong to few groups. Example:
 group NorduGrid
   /O=Grid/O=NorduGrid/OU=uio.no/CN=NorduGrid\ user
   /O=Grid/O=NorduGrid/OU=uio.no/CN=NorduGrid\ user\ 2
 end
    
groupcfg name name ... - this is trigger command. If connected user does not
    belong to one of the groups mentioned after 'groupcfg' all the following
    commands except 'groupcfg' will be ineffective. Only another 'groupcfg'
    command can 'turn on' commands' processing. At the top of configuration
    file processing is 'turned on'. 'groupcfg' without group names also
    'turns on' processing for any user.
    
plugin path plugin_file_name - specifies plugin responsible for accessing
    visible by connected user under the point represented by 'path'. 
    This a block command and it contains plugin-specific commands between
    lines with 'pligin' and 'end'.
    For example lines like
 plugin /base plugin1.so
  ...
 end
 plugin /base/additional/storage1 plugin2.so
   ...
 end
 plugin /base/additional/storage2 plugin3.so
   ...
 end
    will appear as following tree when viewed through gridftp protocol:
 base ------- files and directories provided by plugin1.so
         |
         |--- additional ------- storage1 --- provided by plugin2.so
	                    |
			    |--- storage2 --- provided by plugin3.so


There are two plugins implemented - fileplugin.so and jobplugin.so. 
 fileplugin provides access to local file system. It supports following
commands:

mount local_path - specifies path of the serviced point on local file
    system. fileplugin.so doess it's best for not to follow symbolic links.
    So it is better not to have in the serviced subtree. It should be one 
    mount per plugin.

dir path options - defines access rules for given path (relative to
    one given by mount). Options specify access rules for this directory
    and all included directories. Patterns in path are not supported.
    Supported options are:
  nouser - access is controled only by options specified in 'dir' command.
  owner  - access is also controlled by file owner's access rights
  group  - access is also controlled by file group's access rights
  other  - access is also controlled by file other's access rights
    if none of above commands specified unix access rights are effective.
  read   - user is allowed to read files in this directory.
  delete - user is allowed to delete files in this directory.
  append - user is allowed to append data to files in this directory.
  overwrite - user is allowed to overwrite files in this directory.
  cd     - user is allowed to make this directory it's working directory.
  dirlist - user is allowed to list files in this directory.
  create uid:gid perm_or:perm_and - user is allowed to create new files
          in this directory. Files will have permissions of 
	  default_mask | perm_or & perm_and. At the moment default_mask
	  is rwxrwxrwx . The owner and group of the file will be set to 
	  uid and gid respectively. Bot uid and gid can be specified as
	  numbers or names. Special name '*' means they will be set to
	  those of connected user (as mapped in grid-mapfile).
  mkdir uid:gid perm_or:perm_and - user is allowed to create new directories
          in this directory.
    If any of the above options is not specified user is not allowed to
    perform that action.
	
 jobplugin is used to submit jobs to the cluster served by grid-manager.
It does not take any commands and requires grid-manager configuration file 
to be available.
