II.d.3 Running from the UCX v2+ AUX Server ------------------------------------------ (David Harrold, Milwaukee School of Engineering, ) Define a system logical GOPHER_CONFIG, or GOPHER_CONFIG# where # is the port number (for a multiple server environment), to point to the server's configuration file. For example: $ DEFINE/SYSTEM/EXEC/TRAN=CONCEAL/NAME=NO_ALIAS/NOLOG - GOPHER_CONFIG70 GOPHER_ROOT:[000000]_GOPHER70 In the configuration file (or each configuration file for a server to be started by the UCX AUX Server), add or modify the following items. Inetd: TRUE DataDirectory: GOPHER_ROOT:[000000] ScratchDir: GOPHER_ROOT:[_SCRATCH] SpawnInit: GOPHER$ROOT:[v1216]GOPHER_SPAWN_INIT.COM Where GOPHER_ROOT:[000000] is the root of the data directory for the server; note that this *could* be different for each server, but need not be. GOPHER_ROOT:[_SCRATCH] is a directory which is fully accessible to the authorization under which the server using this configuration file will run (RWED). The directory will receive temporary and scratch files for the server and any subprocesses it spawns. Note that a server started by the UCX AUX Server might not have the system logical SYS$SCRATCH: defined, so a different value with an explicit device and directory path will be required. GOPHER$ROOT:[v1216]GOPHER_SPAWN_INIT.COM is a file in a directory to which the authorization running the server has read and execute access. Whenever a server started by the UCX AUX Server spawns a subprocess, the sub- process will execute the file to define symbols and so forth. Note the use of GOPHER$ROOT:[v1216] is specific to the site psulias.psu.edu; in no way should you feel obligated to use the same device and directory tree specification. Customize, as needed, the GOPHER_SPAWN_INIT.COM file. It should at minimum contain the following lines to insure appropriate operation of GREP searches (customize where your copy of EGREP resides, of course). Since servers started by the UCX AUX Server go through OpenVMS LOGIN but do *NOT* perform the normal SYLOGIN.COM functions, this command file replaces the minimum features required there. Note also that it is not sufficient to define SYS$SCRATCH in this file; the server requires scratch space prior to any spawned tasks, so the scratch directory must be defined in the configuration file. $ V = F$VERIFY(0) $ ON ERROR THEN CONTINUE $ EGREP :== $x:EGREP $ EXIT Customize, as needed, the RUN_GOPHERD_UCX_INETD.COM file. This file is equivalent to RUN_GOPHERD_DAEMON.COM for a detached process server, and similar changes may be made to it. $ set noon $ set proc/priv=(noall, tmpmbx, netmbx) $ if f$search("GOPHER_ROOT:[000000]_run_gopherd_ucx_inetd.log") - then purge/keep=3 GOPHER_ROOT:[000000]run_gopherd_ucx_inetd.log $ run gopher_exe:GopherD.exe $ sts = $status $ ctrstr = "Gopherd_Daemon exit /!AS/ !AS $ line = f$fao(ctrstr,f$trnlnm("GOPHER_RESTART_70"),f$message(sts)) $ if .not. sts $ then $ request "''line'" $ mail NL: SYSTEM /noself /subj="''line'" $ endif Create an authorization for the UCX INETD Gopher Server. Customize Username, UIC, Directory, etc. as needed for your site from this example: Username: UCX$GOPHERD Owner: Gopher Server Account: UCX UIC: [400,1100] ([UCX$AUX,UCX$GOPHERD]) CLI: DCL Tables: DCLTABLES Default: PRODUCTS:[GOPHERD] LGICMD: SYS$LOGIN:LOGIN.COM Flags: DisCtlY DefCLI Restricted DisPwdDic DisPwdHis Primary days: Mon Tue Wed Thu Fri Secondary days: Sat Sun Primary 000000000011111111112222 Secondary 000000000011111111112222 Day Hours 012345678901234567890123 Day Hours 012345678901234567890123 Network: ##### Full access ###### ##### Full access ###### Batch: ----- No access ------ ----- No access ------ Local: ----- No access ------ ----- No access ------ Dialup: ----- No access ------ ----- No access ------ Remote: ----- No access ------ ----- No access ------ Expiration: (none) Pwdminimum: 6 Login Fails: 0 Pwdlifetime: 90 00:00 Pwdchange: (pre-expired) Last Login: (none) (interactive), 16-SEP-1993 13:44 (non- interactive) Maxjobs: 0 Fillm: 1024 Bytlm: 200000 Maxacctjobs: 0 Shrfillm: 0 Pbytlm: 0 Maxdetach: 0 BIOlm: 400 JTquota: 1024 Prclm: 2 DIOlm: 200 WSdef: 350 Prio: 8 ASTlm: 512 WSquo: 20000 Queprio: 0 TQElm: 10 WSextent: 4096 CPU: (none) Enqlm: 3000 Pgflquo: 20000 Authorized Privileges: CMKRNL TMPMBX WORLD OPER NETMBX SYSPRV SYSLCK Default Privileges: TMPMBX NETMBX SYSPRV Create the file LOGIN.COM (may be empty) in the home directory of your UCX$GOPHERD account. Login to the SYSTEM account and add the Gopher Server as a service. Note the use of GOPHER$ROOT:[v1216] is specific to the site psulias.psu.edu; in no way should you feel obligated to use the same device and directory tree specification. $UCX UCX>set service gopherd/port=70 - /user_name=ucx$gopherd - /process_name=ucx$gopherd - /limit=5 - /inactivity=0 - /file=gopher_exe:run_gopherd_ucx_inetd.com - /socket_options=(receive:3000,send:3000) UCX> EXIT Enable the Gopherd Service from the AUX Server $UCX ENABLE SERVICE GOPHERD Note: This must be done after every system reboot; make sure it's in your system startup file. When a client attempts to connect to the configured port, UCX's AUX Server should start a fresh copy of the server to service that client's request. Regardless of how long that copy of the server takes to process the request (and if the server survives the request ;-), other clients will not be obstructed. Note that servers started by the UCX AUX Server might tend to be high- privileged users. The server discards all the dangerous privileges it can after binding to the connected socket. .