
=======================================================================
|=====================================================================|
||                                                                   ||
||                          BEEWEEB SERVER                           ||
||                                                                   ||		
|=====================================================================|
=======================================================================


NOTE:  Please, read on-line documentation on http://www.beeweeb.com
       to know more about Beeweeb products.

       You have to main methods to install BeeweebServer.
       	- install binaries
       	- install source
       You can find quick information above, or read the INSTALL
       document to know more.
       	

  1.  Quick install
      -------------

      - Install source
        Type:

          $ ./configure --prefix=BWBROOTDIR
          $ make
          $ make install
                                                                                       	
      - Install binaries
        Type:

          $ ./install-sh --prefix=BWBROOTDIR

      Use the --prefix=PREFIX options to configure
      Beeweeb to use a particular installation prefix. The default is
      BWBROOTDIR=/usr/local/beeweeb.

  2.  How to install Beeweeb Server
      -----------------------------

      Read the INSTALL document to know how to compile and install
      Beeweeb Server. Then, continue to read this one before running
      program.


  3.  Configuring the Server
      ----------------------

      Once you have succesfully installed and configured Beeweeb Server,
      you'll find the program into BEEWEEBROOT directory.
      It's '/usr/local/beeweeb' by default (if you want to choose another
      one you'll find how to do in the INSTALL document).

      The tree structure of this directory is:

                  BEEWEEBROOT
             (/usr/local/beeweeb/)
                 /   |    |  \
              bin  conf  lib  log

      Into 'conf' dir you can find the Server configuration file:
      	'beeweeb.conf'
      Configuration file is divided into two main sections:
      	- Server section
      	- Modules section
      	
      With the first section you can decide which modules to load 
      (and some other things, you will find help in the file).
      With the second one you can configure the single modules.
	
      Beeweeb Server loads this modules by default:
		
      	- mod_system_users
      	- mod_virtual_users
      	- mod_log
      	- mod_default

      In the next section we'll explain how to use them.

      If you want to change the default configuration you will have 
      to edit 'beeweeb.conf' file.

      NOTE: Please read the next section 'How to use Beeweeb modules'
      before changing the file.


  4.  How to use Beeweeb modules
      --------------------------

      * mod_virtual_users: this module authenticates Beeweeb users using 
                           a text file database.
                           Users are stored in the file in this way:

  username!ownerpassword!guestpassword!home_directory!Private_dir!Public_dir!Web_dir!

                       When an user asks for a connection, the module 
                       read user information from the corresponding
                       line and checks the password.
                       If field 'home_directory' is present,
                       the user will have Beeweeb directories:
                       	
                       	  home_directory/Public
                       	  home_directory/Private
                       	  home_directory/Web

                       otherwise he will have the directories specified 
                       in the file (so we'll have Private_dir, Web_dir
                       and Public_dir).
                       Note: It's not necessary to specify all directories.

                       To use this module you have to create a specific 
                       user on your system. This system user will run
                       processes for all Beeweeb text users. You can
                       specify this user in the configuration file.

        IMPORTANT: 
                   This new user must be specified in the config file.
                   If you don't make it, beeweeb will use the default 
                   nobody user


      * mod_system_users: in this case Beeweeb users are system users.
                          So, the owner Beeweeb password is the system
                          password of user, and the Beeweeb username is
                          the system user name.     	
                          As the previous module, this one uses a text
                          file database to store some information (the
                          file structure is the same, less then owner
                          password).
                          In this way we can check for guest password and
                          work directories as before.

                       Note: in this way every Beeweeb user has a
                             corresponding system user (which will run
                             process with his permissions)

       Note: Once you have choosen the location for database file, you
             have to edit configuration file, and insert in the
             corresponding module section the complete path of this file.

       This modules gives another functionality: 'change password'.
       If you enable this feature, users will be able to change their
       owner and guest password from the BeeweebMapper.
       You can enable owner and guest change password from
       configuration file.

       Note: for owner system users change password, we'll change
             shadow/passwd file. Beeweeb is not responsable for
             any trouble on your system (please read agreement document).
                              	

      * mod_logi   : to log server events in a text file.
                     We give you the possibility to choose which events
                     to log.
                     You have only to edit the configuration file
                     to choose them.


      * mod_default: this module implements some basic features for
                     Beeweeb Server:
                     the path_translation and access_check event.
                     We need the first one to translate file names
                     arrived from client into the right local file name.
                     The second one for checking if the user has
                     permission to execute the requested opertation.
                     In this case we check if user is owner or guest, and
                     enable or not enable the operation.

                                           	                    	
  5.  Getting started
      ---------------

      As we said before, there is a 'bin' directory into BEEWEEBROOT.
      Here you have this executable programs:

         * bwbd
         * beeweebstart
         * beeweebstop
         * bwbadduser / bwbaddvirtuser
         * bwbpasswd  / bwbpasswdvirtuser
         * bwbaddvirtuser_exe

     You can use 'bwbadduser' or 'bwbaddvirtuser' to add users to your 
     text file database. The First one for System users, the Second one 
     for Virtual users.
     To run the program you have also to specify which is the file
     where you  want to store data.
     It's because you can have more database file for users.

        $ bwbadduser <filename>
        $ bwbadduservirtuser <filename>

     When you will insert an user, the program will ask you for
     'home_directory':
     if you specify one the program will create (if they doesn't exist)
     three folders: home_directory/Private, home_directory/Private,
     home_directory/Web.
     For System user it will ask you if to use user home directory,
     if you say 'no' it will ask you to specify Private,Public and Web
     directories.

     You can use 'bwbpasswd' or 'bwbpasswdvirtuser' executable to change 
     user passwords to your database. The First one for System users, the
     Second one for Virtual.
     Tor run this program you have to specify the option:
      - 'g' or 'o' to change guest or owner password (only for Virtual,
        Sytem can only change guest password) 
      - the username 
      - the database file

     The syntax is:

     	$ bwbpasswd <username> <filename>
     	$ bwbpasswdvirtuser <username> <filename>

     Now you are ready to run Beeweeb Server.

     The bwbd is the executable file of Server. It does need
     a parameter to start:
     the home directory of Beeweeb Server (BEEWEEBROOT).
     To run it you must use the auxiliar program beeweebstart,
     so everything wiil be done right.

     There are two possible way to shutdown Beeweeb Server.
     They correspond to options to give to bwbdstop executable:

     	$ beeweebstop now
     	
     	or simply
     	
     	$ beeweebstop
     	
     The Second case provides to wait some seconds before shutting down,
     so every existing  connection will be correctly terminated.
     First case stop Beeweeb Server immediately, without waiting for a
     "gracefull closing" of all connections.

     Once you installed the Beeweeb Server you will find an user in the databse
     in the `conf` installation directory. You can use it to check if your
     system is working. The username you can try is `dan`, and he has no password.
	

     Thanks for using Beeweeb.


