HELIOS WebShare User manual


7 WebShare File Server
7.1 About
"websharesrv" is the WebShare File Server, a native program running on the machine which can also host the HELIOS EtherShare/PCShare file servers, and is controlled by the HELIOS Service Controller (see chapter 9 "The Service Controller" in the HELIOS Base manual). It spawns a separate process for each user login.
The WebShare File Server offers various and versatile user and document management features, including E-mail notification on user login, additional customization in WebShare action scripts, etc.
7.2 User configuration file
"webshare.passwd" is the user configuration file of the WebShare File Server. Along with the password of every user, it stores the individual settings of every user. Specifications made in the "My User Preferences" administration window (compare 5.3 "My User Preferences") are stored in "HELIOSDIR/var/conf/webshare.passwd":
root::0::0::
heliosuser::0::zs=1:::
martin::0::zs=1:::
ws1:md5_dd1c91f5d657b421c339592f8:65534::zs=1:::
Each line in "webshare.passwd" starts with the user name followed by several fields which are separated by colons. The first (user name) and third (user ID) field must be set, the other fields may remain blank.
Field Explanation
1. User name Virtual User or Host User
2. Password Password in clear text or MD-5 hash code of
clear text password.
A string starting with md5_ is a crypted
password for Virtual Users. For Virtual Users
this field must include a password entry. For
Host Users this field may be empty if there is
no additional WebShare password set and the
HELIOS host pass word is used. We recom-
mend to set a different password, though.
3. User ID An ID of 0 identifies a host user. An ID other
than 0 is used for a Virtual User. The number is
the ID of the host user the virtual user is
mapped to.
4. Field Expiry date
This field contains the user expiry date/time in
the format: dd-MMM-yyyy-kk-mm
For example: 28-Feb-2004-14-21
The Expiry date is entered in the Expires
field
in the "User Administration" window
according to the syntax specified by the prefer-
ence DateFormat (7.8 "Preference keys").
5. Field Comma-separated flags
Currently, only the zipstream flag is used.
When zipstream is enabled, this field contains
"zs=1", otherwise "zs=0". If there is no entry,
zipstream is on.
6. Field Client encoding for uploads/downloads
Name of the client encoding for uploads/
downloads, e.g. "MacRoman". Empty when
the "OS Default" has been specified.
7. Field E-mail address of user
This has to be a fully specified e-mail address,
for example:
username@mycompany.com
8. Field Comment
Make sure that the comment does not contain
special characters like a colon (":"). These will
be exchanged by "_" in order to keep
"webshare.passwd" compatible.
7.3 WebShare utility programs

Note: "zipstream" and "unzipstream" are located in the "HELIOSDIR/bin" directory. All of the scripts described in this section reside in the "HELIOSDIR/etc/webshare" directory.

7.3.1 zipstream
This utility creates a Zip archive to which files and folders can be added in a compressed form. The advantages over the Zip program are that there are no temporary files created during compression, and file downloads can commence immediately without waiting for the Zip archive to be created. Special file attributes like creation date, Macintosh type & creator and resource fork are encoded into MacBinary, which is preserved in the compressed Zip archive. UTF-8 is always the encoding used for file/folder name representation in the file system. The encoding used for file/folder name representation in the ZIP archive can be specified to match the client computer system, e.g. MacRoman, PC850, ISO8859-1, UTF-8, etc.
Usage:
zipstream [options] file
zipstream -h (for help info)
Example:
Create an Zip archive named "archive.zip" and add file1, file2, dir1 and dir2 to the archive:
zipstream -f archive.zip file1 file2 dir1 dir2
Example:
Create an Zip archive and pipe it into the tar application:
zipstream file1 file2 dir1 dir2 | tar cvf test.tar -
The following options may be used with "zipstream":
-f
Write the Zip archive to the file instead of writing to "stdout".
-C
Input files are read from this directory.
-l
Zip compression level. Valid levels are from 1 (best speed) to 9 (best compression). The default level is 6.
-c
Encoding used for file names in Zip archive. The default encoding is UTF8. Use uniconv -l to list all available encodings.
"zipstream" is called with this option by the WebShare File Server when an encoding is selected via the Download Encoding pop-up menu in the "User Administration" or "My User Preferences" window.

Note: The server volume encoding for "zipstream" is always assumed to be UTF-8. Non UTF-8 volumes are not supported by "zipstream".

-s
Print estimated Zip archive size to "stdout" (4 byte integer, network byte order).
-b
Write output in blocks of n KBytes. The default is 32 KB.
-n
No Zip streaming format.
"zipstream" is called with this option by the WebShare File Server when the checkbox Zip Streaming Format in the "Administration" window is not ticked.
-m
Encode the data and resource fork of a Macintosh file to MacBinary.
-t
Include file comments in MacBinary (works only with -m option).
-r
Preserve ".rsrc" directories. By default, ".rsrc" directories are skipped when creating the Zip archive. This option has no effect if -m is set.
-e
Add report file "DownloadLog.txt" to Zip archive containing file access errors and, if -v is also set, verbose information.
-v
Display verbose information on "stderr" or, if -e is also set, write verbose information to "DownloadLog.txt" in the Zip archive.
-z
Resolve symbolic links, add files into Zip archive.
7.3.2 unzipstream
The "unzipstream" utility expands Zip files and decodes MacBinary files.
By default it reads a Zip or MacBinary file from "stdin". The -f option can be used to specify a Zip or MacBinary input file. Output files are stored under the names defined in the Zip or MacBinary file. If the input file is not a Zip or MacBinary file, it will be written to "stdout" or to the file specified by the -o option. The -C option specifies the destination directory for stored files. The -n option specifies the name of a notification script that will be called whenever a file is being written to disk. The script will be called with two parameters: the temporary file name and the original file name.
Usage:
unzipstream [options] file
unzipstream -h (for help info)
Examples:
List the Zip archive, assuming Windows (PC850) encoding:
unzipstream -l -c PC850 -f archive.zip
Extract the Zip archive which was created by DropZip, assuming Macintosh (MacRoman) encoding:
unzipstream -c MacRoman -f archive.zip
Extract all files in "abc.zip" to the directory "/data/zips":
unzipstream -f abc.zip -C /data/zips

Note: The server volume encoding where Zip files are unpacked is always assumed to be UTF-8. Non
UTF-8 volumes are not supported by "unzipstream".

The following options may be used with "unzipstream":
-f
Read the Zip archive instead of reading from "stdin".
-o
Output file name. This is only used if the input file is not a Zip or MacBinary file.
-C
Output files are written to this directory.
-c
Encoding used for file names in ZIP archive. The default encoding is UTF8.
Use uniconv -l to list all available encodings.
-r
Preserve ".rsrc" directories. By default, files in ".rsrc" directories are not extracted from the Zip archive.

Note: To prevent inconsistencies between information stored in the desktop databases of an EtherShare volume and the files/folders on this volume, do not upload or extract a Zip archive with ".rsrc" directories directly into an active EtherShare volume. Make sure to use the "Desktop Utilities".

-n
Name of a notification script that will be called after a file is extracted. The script is called with the following parameters:
-m
Specify the MIME type of the input file.
If -m is given, "unzipstream" does not check the header of the input file to determine the file type. Currently, the only known MIME type is "application/x-macbinary".
-l
List files instead of extracting them.
-u
Unhide "dot files" by replacing the leading dot with an underscore.
Example:
.DS_Store is represented as _DS_Store
-v
Display verbose information on "stderr".
Please note that if a Zip file on its part contains Zip files in the archive, these will not be further expanded.
All WebShare utility scripts will use the host OS tools, e.g. "cp" to copy files, etc. When EtherShare is installed, the "DesktopTools dt" command will automatically be used within the "wscopy", "wsdup", "wsmkdir", "wsuploadmv", "wsmv", "wsperm" and "wsrm" scripts to ensure that all changes are applied to data and resource parts of files and folders. In doing so, EtherShare volume specific requirements are met.

Note: Customizing the "Perl" utility scripts should never be done in the original script file, copy the script into the "HELIOSDIR/var/webshare" directory for customized scripts. WebShare automatically looks first in the
"var/webshare" directory for all scripts and uses
"etc/webshare" only as a fallback if the script is not available in "var/webshare".

7.3.3 wscommon.pm
This file is a Perl library module which is included by all WebShare Perl scripts. It contains, for example, information on other installed HELIOS products, etc.
7.3.4 wscopy
Usage:
wscopy destdir srcdir files...
This program is called by the WebShare File Server everytime the Copy Selection button and the Paste Selection button is clicked in the sharepoint toolbar. "destdir" specifies the destination directory to which the specified files and folders from the "srcdir" are copied to. "wscopy" uses the host "cp" program to copy files.
7.3.5 wsdownload
Usage:
wsdownload srcdir files...
This program is called by the WebShare File Server everytime the Download button is clicked in the sharepoint toolbar. The "srcdir" specifies the current directory of the user's Web session. The files argument consists of the files and folders which have been selected for download by the user. "wsdownload" uses the WebShare "zipstream" utility to stream an on-the-fly generated Zip archive without temporary files to "stdout". Settings like Zip format, file name encoding, MacBinary support, client platform (Mac or Windows), etc. are automatically determined by the "wsdownload" script.
7.3.6 wsdup
Usage:
wsdup dir files...
This program is called by the WebShare File Server everytime the Duplicate button is clicked in the sharepoint toolbar.
7.3.7 wsmkdir
Usage:
wsmkdir dir newdir
This program is called by the WebShare File Server everytime Create Dir is selected from the "Actions" pop-up menu in the sharepoint toolbar.
7.3.8 wsmv
Usage:
wsmv dir source dest
This program is called by the WebShare File Server everytime Rename is selected from the "Actions" pop-up menu in the sharepoint toolbar.
7.3.9 wsperm
Usage:
wsperm dir user group userMode groupMode otherMode recursive files...
This program is called by the WebShare File Server everytime Permissions is selected from the "Actions" pop-up menu. The specified files and folders in the current directory "dir" are changed using the host's "chmod", "chgrp" and "chown" commands, according to the specified parameters.
7.3.10 wspreview
Usage:
wspreview srcfile dstfiletype previewfile resOptions page antialiasPDF
This program is called by the WebShare File Server everytime a file name is clicked in the sharepoint "Name" column in case the preview file does not exist in the cache area.
Parameters:
Name Description
srcfile The complete path name to the image or
document the user selected for preview.
dstfiletype The file type of the preview image usually
JPEG or PNG, see 7.5.4 "Generated previews"
for details.
previewfile The pathname of the preview filename.
The filename specifies the preview name to be
saved in the preview cache area.
resOptions This parameter specifies the preview options
for the ImageServer "layout" command.
Different parameters are split by a "|"
character. For example,
"ocoaLigature0 -oxpix=256|-orotate=90|
-oflipvertical"ocoaLigature1.
page The page number starting with 1 used for
multipage documents.
antialiasPDF "True" or "False" to specify antialiasing for PDF
input files.
7.3.11 wsrm
Usage:
wsrm dir files...
This program is called by the WebShare File Server everytime the Delete button is clicked in the sharepoint toolbar.
7.3.12 wsupload
Usage:
wsupload dstdir filesize filename mimetype
This program is called by the WebShare File Server everytime the Upload link is clicked in the sharepoint toolbar. "wsupload" receives the upload stream from "stdin" and unpacks the uploading stream in the directory specified by the "dstdir" parameter. The "unzipstream" utility is used as a backend to unpack the data stream on-the-fly. As soon as a file within a Zip stream is detected, the file is saved with a temporary name with the process ID as suffix. For each file in the Zip stream the "wsuploadmv" script is called to rename the file with the process ID suffix to its final name. All this is done on-the-fly while "unzipstream" continues to receive data with additional files within the Zip stream. "wsupload" automatically detects if the upload is done from a Windows or Macintosh client, and will set up a proper character encoding according to the user and system default settings.
7.3.13 wsuploadmv
Usage:
wsuploadmv dir filesize filename mimetype
This program renames uploaded files from their temporary name to their final name. "wsuploadmv" is a good place to add more processing tasks, e.g. a virus scanning software to verify uploaded files.
7.3.14 WebShare File Server (telnet service port)
This service displays WebShare File Server user and status information.
After calling localhost with the appropriate port on the command line, you may enter the additional commands users, status, or help to display possible options:
$ telnet localhost 2016
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Welcome to the HELIOS WebShare File Server service port
help
help - print a list of available commands
quit - close connection
status - show status information
users - show user information
users
# PID User UID Address CRC Login
1 inactive tom 101 192.168.1.2 24c9ce Mon 10:38
1 active joe 108 192.168.1.8 3bffc9d6 Thu 11:23
Summary: 1 active users (1 inactive users)
status
WebShare File Server, Version 1.0.0
Up since: Thu Nov 13 10:25:30 2003
Max users: 2
Max users allowed: 100

Note: For security reasons the "telnet" service port only accepts incoming connections on the WebShare File Server, using the localhost address.

7.4 WebShare scripts
7.4.1 Custom scripts
It is possible to include scripts, which automate tasks etc., in the WebShare workflow. WebShare comes with three template scripts ("wslogin", "wslogout" and "wsaddshare") which have to be customized by the user in order to take any effect, and four "action scripts" (see 7.4.3 "Action script examples"). All these scripts are stored in the directory
"HELIOSDIR/etc/webshare/samples". In addition the WebShare utility scripts, described in 7.3 "WebShare utility programs", can also be customized. A customized script must be copied into "HELIOSDIR/var/webshare" because this subdirectory contains all configuration data. This has the advantage that, e.g. after a software overinstall, all customized configuration data is preserved. The original template remains in "HELIOSDIR/etc/webshare/samples". When specific functions are requested, WebShare first looks for a script in "HELIOSDIR/var/webshare". Subsequently, it looks in "HELIOSDIR/etc/webshare".
The following scripts are only active if copied into the "HELIOSDIR/var/webshare" directory.
wslogin
This script is called after a successful WebShare login with the parameters:
The script can be customized to perform any desired action upon a user login.
wsaddshare
Everytime a WebShare Administrator adds or modifies a sharepoint, the "wsaddshare" script is called. Its parameters are:
By customizing this script, a System Administrator can prevent WebShare Administrators from creating a sharepoint whose path points beyond the administrative (= allowed) area. A return value=0 would allow creating a sharepoint or applying changes in a sharepoint, whereas a value0 would deny these actions, while issuing a message to the System Administrator via "stderr".
Example:
#!var/run/runperl -w
# $Id: Kap7_doc.html,v 1.2 2004/01/27 13:39:42 hendrik Exp $
#@(#)HeliosVersion 1.0.0 Copyright 2003 HELIOS
# Software Garbsen

# WebShare sample script to perform any actions or checks # whenever
# a new Sharepoint is defined or Sharepoint setting are
# modified.
# The script must either
# - exit with status 0 to allow saving the Sharepoint, or
# - write an error text to STDERR and exit with status
# != 0 if saving the Sharepoint is not allowed.
#
# NOTE: To use the sample script, copy this file into the
# HELIOSDIR/var/webshare directory, edit it according to
# your needs, and make sure that it is executable.

sub BEGIN {
use vars qw($heliosdir);
open (FD, "/etc/HELIOSInstallPath") || die "cannot
find HELIOS product, check installation";
chop($heliosdir = <FD>);
close(FD);
unshift (@INC, ".", "$heliosdir/etc/webshare");
}

use strict;
use wscommon;

if ($#ARGV + 1 != 6) {
print STDERR "Usage: $prog sharename sharepath
sharemail shareoptions usermembers
groupmembers\n";
exit 1;
}

my $sharename = shift; # Sharepoint Name
my $sharepath = shift; # Sharepoint Path
my $sharemail = shift; # E-Mail on Access
my $shareoptions = shift; # Options, comma separated
my $usermembers = shift; # User Members, comma separated
my $groupmembers = shift; # Group Members, comma separated

# exit 0 without any stderr messages will allow to add the
# share
exit 0;

# Example: Allow only sharepoint paths starting with
# "/webshare/" or "/samples/":

my @allowedPaths = ("/webshare/", "/samples/");
foreach my $path (@allowedPaths) {
exit 0 if ($sharepath =~ /^$path/);
}

print STDERR "Adding sharepoint directory $sharepath not allowed!\n";
exit 1;

wslogout
As soon as the user has logged out, this script is called with the following parameters:
This script may be customized e.g. to clean up directories or to accomplish similar tasks. In contrast to wslogin and wsaddshare, the return value of this script is not interpreted.
7.4.2 Debugging WebShare scripts
All WebShare scripts are developed in Perl including the sample scripts. WebShare scripts can be developed in any language, e.g.: shell, PHP, Perl, Java, C/C++, etc. HELIOS prefers Perl because it is very powerful and compatible across different server platforms. This chapter provides guidelines on how to debug Perl scripts to be used as utility and action scripts within WebShare. Make sure to implement and debug your script so that it works in general before you begin debugging it in the WebShare environment.
Environment requirements:
All scripts are assumed to be called with the current directory HELIOSDIR, which is "/usr/local/helios" by default. To be compatible on all platforms without depending on the Perl installation path all WebShare Perl scripts include a "#!var/run/runperl" in the first line. "runperl" is a symbolic link to the local Perl interpreter. The "runperl" link is automatically created during the WebShare installation. All WebShare default scripts are included in "etc/webshare". Customized scripts should be stored in "var/webshare" to avoid overwriting your scripts during a new installation. Another benefit is that the entire "var" folder contains all customization and settings, which allows easy migration to a different server platform without applying all changes again.
Printing debugging information:
As many scripts produce their output to "stdout" or "stderr", printing script variables will produce mixed output which leads to malfuctions. All HELIOS scripts support debug output into a file by specifying the "DEBUGTTY" environment variable.
A simple debugging session:
# cd /usr/local/helios
# export DEBUGTTY=/dev/tty
# var/webshare/actions/yourscriptname
The above commands allow to test drive the script and to check the results.
A debugging session within a running WebShare File Server:
# cd /usr/local/helios
# bin/srvutil stop websharesrv # to stop the webshare file
server
# export DEBUGTTY=/dev/tty
# sbin/websharesrv
The script will now be called if action or custom scripts are executed by the WebShare File Server. The manual start of the WebShare File Server allows that all output will be printed into the terminal output (using the current tty).
7.4.3 Action script examples
As already mentioned in 7.4.1 "Custom scripts", WebShare comes with four action scripts ("wscmdargs", "wsll", "wsdu" and "wsfind"). Action scripts must be stored in "HELIOSDIR/var/webshare/actions" in order to become available in the "Actions" pop-up menu in the toolbar of the sharepoint window (5.2.1 "The "Actions" pop-up menu").
wscmdargs
Action script to print all action arguments:
#!var/run/runperl -w
#Title=Cmd ARGS

# $Id: Kap7_doc.html,v 1.2 2004/01/27 13:39:42 hendrik Exp $
#@(#)HeliosVersion 1.0.0 Copyright 2003 HELIOS Software
# Garbsen

# WebShare sample action script to print the environment
#
# An example how to use the given path.
#
# NOTE: To use the sample action, copy this file into the
# HELIOSDIR/var/webshare/actions directory, edit it
# according to your needs, and make sure that it is
# executable.

sub BEGIN {
use vars qw($heliosdir);
open (FD, "/etc/HELIOSInstallPath") || die "cannot find HELIOS product, check installation";
chop($heliosdir = <FD>);
close(FD);
unshift (@INC, ".", "$heliosdir/etc/webshare");
}

use strict;
use wscommon;

if ($#ARGV + 1 < 2) {
print STDERR "Usage: $prog dir\n";
exit 1;
}

my $dir = shift; # given directory
my $nfield = shift; # unused content of the input field
my $file;
my $n = 1;

print "<H3>Action Script Parameter</H3>";
print "Action Script Name: $prog\n";
print "FileBrowser directory: $dir\n";
print "Name Field: $nfield\n";
for $file (@ARGV) {
print "ARGS: $n $file\n";
$n++;
}

print "<hr>";
print "<H3>WebShare Environment variables</H3>";
print "WSWindowEncoding: " . $ENV{"WSWindowsEncoding"} . "\n";
print "WSMacintoshEncoding: " . $ENV{"WSMacintoshEncoding"} . "\n";
print "WSUserEncoding: " . $ENV{"WSUserEncoding"} . "\n";
print "WSStreamingZip: " . $ENV{"WSStreamingZip"} . "\n";
print "WSUser: " . $ENV{"WSUser"} . "\n";
print "WSClientAddress: " . $ENV{"WSClientAddress"} . "\n";
print "WSUserAgent: " . $ENV{"WSUserAgent"} . "\n";
print "HELIOSDIR: " . $ENV{"HELIOSDIR"} . "\n";

print "<hr>";
print "<H3>Host Environment variables</H3>";
print "PATH: " . $ENV{"PATH"} . "\n";
print "User ID: $<\n";
print "Effective User ID: $>\n";
print "Group ID: $(\n";

print "<hr>";
print "<H3>WebShare Active Users</H3>";
system($ENV{"HELIOSDIR"} . "/bin/swho -c | egrep '(PID|WebShare)'");

exit 0;
wsll
Action script for a directory listing:
#!var/run/runperl -w
#Title=ls -l

# $Id: Kap7_doc.html,v 1.2 2004/01/27 13:39:42 hendrik Exp $
# This is an unpublished work copyright (c) 2003 HELIOS
# Software GmbH
# 30827 Garbsen, Germany
#@(#)HeliosVersion 1.0.0 Copyright 2003 HELIOS Software # Garbsen

# WebShare sample action script to list the content of a # directory.
#
# An example how to use the given path.
#
# NOTE: To use the sample script, copy this file into the
# HELIOSDIR/var/webshare/actions directory, edit it
# according to your needs, and make sure that it is
# executable.

sub BEGIN {
use vars qw($heliosdir);
open (FD, "/etc/HELIOSInstallPath") || die "cannot find HELIOS product, check installation";
chop($heliosdir = <FD>);
close(FD);
unshift (@INC, ".", "$heliosdir/etc/webshare");
}

use strict;
use wscommon;

if ($#ARGV + 1 < 2) {
print STDERR "Usage: $prog dir\n";
exit 1;
}

my $dir = shift; # given directory
my $nfield = shift; # unused content of the input field


system("ls", "-l", $dir);


exit 0;
wsfind
Action script for a find file operation:
#!var/run/runperl -w
#Title=Find File

# $Id: Kap7_doc.html,v 1.2 2004/01/27 13:39:42 hendrik Exp $
#@(#)HeliosVersion 1.0.0 Copyright 2003 HELIOS
# Software Garbsen

# WebShare sample action script how to find files
#
# shows the use of the input field
#
# NOTE: To use the sample action, copy this file into the
# HELIOSDIR/var/webshare/actions directory, edit it
# according to your needs, and make sure that it is
# executable.

sub BEGIN {
use vars qw($heliosdir);
open (FD, "/etc/HELIOSInstallPath") || die "cannot find HELIOS product, check installation";
chop($heliosdir = <FD>);
close(FD);
unshift (@INC, ".", "$heliosdir/etc/webshare");
}

use strict;
use wscommon;

if ($#ARGV + 1 < 2) {
print STDERR "Usage: $prog dir nfield \n";
exit 1;
}

my $dir = shift; # directory where we start the search
my $nfield = shift; # name of the file, that we want to find

system("find", $dir, "-name", $nfield);

exit 0;
wsdu
Action script to show disk usage of files:
#!var/run/runperl -w
#Title=Disk Usage

# $Id: Kap7_doc.html,v 1.2 2004/01/27 13:39:42 hendrik Exp $
#@(#)HeliosVersion 1.0.0 Copyright 2003 HELIOS
# Software Garbsen

# WebShare sample action script to show the disc usage of
# files
#
# demonstrates how to make use of the list of the selected
# files from webshare.
#
# NOTE: To use the sample action, copy this file into the
# HELIOSDIR/var/webshare/actions directory, edit it
# according to your needs, and make sure that it is
# executable.

sub BEGIN {
use vars qw($heliosdir);
open (FD, "/etc/HELIOSInstallPath") || die "cannot find HELIOS product, check installation";
chop($heliosdir = <FD>);
close(FD);
unshift (@INC, ".", "$heliosdir/etc/webshare");
}

use strict;
use wscommon;

if ($#ARGV + 1 < 3) {
print STDERR "Usage: $prog dir nfield file1 ...\n";
exit 1;
}

my $dir = shift; # directory, where the action shall be executed
my $nfield = shift; # content of the input field
my $file; # list of selected files.

chdir($dir) || die "$prog: cannot chdir to $dir\n";

for $file (@ARGV) {
system("du", $file);
}

exit 0;
7.5 Image and document previews
WebShare sharepoints can have the Allow Preview option enabled, which will use HELIOS ImageServer to generate bitmap previews when a user clicks on an image or document. WebShare automatically detects supported image and document types and will present an HTML page containing an image/document preview for a given resolution.
The previews are generated by the "wspreview" script which makes use of the ImageServer image conversion program "layout". All previews will be generated as either JPEG or PNG files in an RGB or grayscale color space.
This script can be modified to change the default behavior. Or it can be used as a template for custom "action scripts", e.g. to create previews with specific ICC profiles.
7.5.1 Image previews via the ImageServer option
The following image input formats are supported:
TIFF, EPSF, DCS-1, DCS-2, Scitex-CT, JPEG, PICT, Photoshop, BMP and PNG images.
7.5.2 Document previews via the ImageServer option
View QuarkXPress document previews for Mac and Windows documents and Adobe InDesign document previews for Mac and Windows documents. For Document previews it is necessary to install the HELIOS Preview XTension or plug-in for QuarkXPress or InDesign, which automatically save together with the document an ".xpv" file containing the document previews. A WebShare user can click on this ".xpv" file to view the document previews of each page.
7.5.3 PDF document previews via HELIOS PDF HandShake and ImageServer option
Supports all PDF 1.0-1.4 files without passwords.
7.5.4 Generated previews
WebShare generates PNG previews for the following formats:
WebShare generates JPEG previews for the following formats:
All previews which are generated once will be stored in a customizable caching area to allow the reuse of existing rendered previews by other users.
It is possible to customize the preview generation by using different ImageServer parameters in the "wspreview" script. E.g. to specify a different ICC profile for the RGB color space which is used for the previews.
The following resolutions are supported by default:
Additional preview resolutions can be specified as "dpi or pixel" values in the "WebShare Server Preferences" administration window. The customizable resolutions are selectable in the pop-up menu, clicking the Go button will start generating the preview specified in the pop-up. The preview resolutions should be limited to avoid very large preview images which may take very long to download and display within the browser.
7.6 Custom welcome message
It is possible to set up a custom welcome message for the WebShare login window by adding a "wslogin.html" document to the directory "HELIOSDIR/var/webshare/". This document can contain plain ASCII text or HTML content (using UTF-8 encoding). Fig. 27 shows an example using "wslogin.html" with the following HTML content:
Welcome to HELIOS WebShare.
Fig. 27: Customized WebShare login window

7.7 Custom welcome image
You may also set up a custom image for the WebShare login window. The image must be in the PNG image format and be named "wslogin.png". After saving it to the "HELIOSDIR/var/webshare/" directory, it should immediately appear in the WebShare login window (Fig. 28), replacing the default HELIOS WebShare image.
Fig. 28: WebShare login window with custom image

When the image "wslogin.png" is withdrawn from "HELIOSDIR/var/webshare/" HELIOS WebShare uses the default image (Fig. 27) again.
7.8 Preference keys
This section lists all the preference keys that are pertinent to the WebShare File Server. Find a description of how to set, view, change or delete preferences, with the HELIOS "prefdump", "prefvalue", and "prefrestore" utility programs in the HELIOS Base manual, chapter 6, "HELIOS utility programs".

Important: Make sure that preference keys DO NOT start or end with a slash ("/") character, and note that they are case-sensitive!

Preference
Type Default (""=no preference stored)
7.8.1 WebShare File Server preference keys
Key: Programs/websharesrv/<key>
The following keys require a new login to take effect:
TcpRecvSize
int 65536 (64 x 1024)
Specifies the maximum number of TCP data bytes that are passed from the clients to "websharesrv" over the network during a transaction. The number of bytes may need to be limited if the buffer size in the UNIX server is too small. TcpRecvSize can be varied to optimize the data transfer rate.
TcpSendSize
int 65536 (64 x 1024)
Specifies the maximum number of TCP data bytes that are passed from "websharesrv" to the clients over the network during a transaction. The number of bytes may need to be limited if the buffer size in the UNIX server is too small. TcpSendSize can be varied to optimize the data transfer rate.

Note: Changed values in TcpRecvSize and TcpSendSize will automatically be assigned to the WebShare WebObjects Server as well, for the next login.

CacheSize
int 30 (in MB)
Specifies the cache size value of the WebShare File Server for preview files. It corresponds to the Cache Size in MB value in the "WebShare Server Preferences" menu.

Note: The default value for CacheSize is 30 (MB), due to the usually limited disk space in "HELIOSDIR/var". If you change the CacheDir preference to another path, it is recommended to set CacheSize to a value of at least 300 (MB).

AllowHostUsers
bool TRUE
Specifies whether users are allowed to log on to the WebShare File Server with their host login name. The setting reflects that of the Enable WebShare for Host Users checkbox in the "WebShare Server Preferences" menu.
AllowVirtualUsers
bool TRUE
Specifies whether users are allowed to log on to the WebShare File Server with their (virtual) WebShare login name. The setting reflects that of the Enable WebShare for Virtual Users checkbox in the "WebShare Server Preferences" menu.
AdminNotify
str ""
Specifies an e-mail address to which a notification is sent as soon as a client with Admin rights logs on to the WebShare File Server. It corresponds to the E-Mail Notification on Admin Login entry in the "WebShare Server Preferences" menu.

Note: Make sure that the complete receiver account is specified, e.g. webshare@mycompany.com

UserNotify
str ""
Specifies an e-mail address to which a notification is sent as soon as a user logs on to the WebShare File Server. It corresponds to the E-Mail Notification on User Login entry in the "WebShare Server Preferences" menu.

Note: Make sure that the complete receiver account is specified, e.g. webshare@mycompany.com

AllowAllReadWrite
bool FALSE
If set to TRUE, this preference enables the sharepoint preferences AllRead and AllReadWrite. In that case, the additional options Always Allow Reading and Always Allow Read/Write (see 7.8.2 "Sharepoint preference keys") will be shown in the "Sharepoint Administration" window.

Important: It may considerably reduce host security to set the AllowAllReadWrite flag to TRUE because if required, host access rights are bypassed, with all user processes changing to "root" processes!

DateFormat
str "dd MMM yyyy kk:mm"
Specifies the format with which the date is displayed in the directory listing of the "Sharepoint" menu. It corresponds to the Directory Listing Date Format entry in the "WebShare Server Preferences" menu. Also, this preference specifies the required syntax for the Expires field in the "User Administration" window. See details at:
http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html
MailHost
str "mailhost" (SMTP: ip:port)
Specifies a mail server (SMTP) from which WebShare
e-mail notification messages are sent. It corresponds to the Outgoing Mail Server (SMPT) entry in the "WebShare Server Preferences" menu.
Example:
host.yourdomain.com
IP
: Can be a hostname, DNS name, or the address in decimal
port: The SMTP server port (25 if not specified)
MailAccount
str ""
Specifies an (already existing) e-mail account the WebShare SMTP mail server uses to send e-mail notification messages. It corresponds to the Mail Sender Account (WebShare) entry in the "WebShare Server Preferences" menu.

Note: Make sure that the complete WebShare sender account is specified, e.g. webshare@mycompany.com

mail
bool TRUE
Specifies whether e-mail notification is used at all.
SendMailOnActionScript
bool FALSE
If set to TRUE, this preference sends an e-mail, as soon as a WebShare action script is executed, to the address that is specified in the E-Mail on Access field in the "Sharepoint Administration" window. See EmailAccess.
DefaultWindowsEncoding
str "PC850"
Specifies the default encoding method when downloading files on Windows clients. The setting reflects that of the Default Windows Encoding pop-up menu in the "WebShare Server Preferences" menu.
DefaultMacintoshEncoding
str "MacRoman"
Specifies the default encoding method when downloading files on Macintosh clients. The setting reflects that of the Default Macintosh Encoding pop-up menu in the "WebShare Server Preferences" menu.
ShowHiddenFiles
bool FALSE
If set to TRUE, hidden files ("dot files" and files which have been marked as hidden in an EtherShare volume) are displayed in a sharepoint directory listing.
HideSpecialFiles
strlist ""
Specifies file names which should always be hidden in a directory listing.
Previewresolutions
str "36 dpi,72 dpi,96 dpi,
144 dpi,256 pixel,
512 pixel,768 pixel,
1024 pixel"
Specifies the (comma-separated) pixel/resolution values which are available in the "Sharepoint" preview pop-up menu. The "zoom icon" resolution values are fixed, and are not affected by this preference.
LabelNames
strlist "Gray" "Essential"
"Green" "Hot"
"Purple" "In Progress"
"Blue" "Cool"
"Yellow" "Personal"
"Red" "Project 1"
"Orange" "Project 2"
Specifies the name for a label color that has been defined on the WebShare File Server. It corresponds to the Label Name entry in the "WebShare Color Label Preferences" menu. The default values in the left column apply to the "Mac OS X 10.3 color label defaults"; those in the right column apply to "Mac OS 9 color label defaults". Values are specifyed in a comma-separated stringlist, e.g.:
"First,Second,Third,Forth,Fifth,Sixth,Seventh"
LabelColors
strlist "9E9E9E" "FF6402"
"9BE233" "DD0806"
"ED5FB1" "F20884"
"369EDE" "02ABEA"
"F3E734" "0000D4"
"FF3F4B" "006411"
"FFB634" "562C05"
Specifies the six-hexadecimal digit color code for a label color that has been defined on the WebShare File Server. It corresponds to the Color entry in the "WebShare Color Label Preferences" menu. The default values in the left column apply to the "Mac OS X 10.3 color label defaults"; those in the right column apply to "Mac OS 9 color label defaults". Values are specifyed in a comma-separated stringlist, e.g.:
"FF3F4B,FFB634,F3E734,9BE233,369EDE,ED5FB1,9E9E9E"
The following keys require a service restart to take effect:
TcpPort
int 2010
Specifies the WebShare File Server port number. Additional TCP ports (up to a total of five) will automatically be allocated as needed by the WebShare File Server.

Note: The value of this preference needs to be identical with the WebShare WebObjects Server preference WSHostPort (6.5 "Preference keys"). If there should be the need to change a value, then make sure that both preference keys are assigned the same value.

TelnetPort
int 2016
Specifies the "telnet" port number of the WebShare File Server.
sessions
int (see text)
Specifies the maximum number of workstations (clients) that are permitted to work on the WebShare File Server simultaneously. This value should normally be the same as the total number of workstations that are connected to the WebShare File Server, and should be less than or equal to the number of sessions allowed by your software license. The default value for sessions is the number of sessions allowed by your software license.
minuid
int see text
Specifies the lowest number allowed for user IDs. All host users which have a lower user ID than that specified by minuid, and all virtual users running as a host user with a user ID lower than that specified by minuid, are not permitted to log in. The default behavior is that all IDs are allowed.
maxuid
int see text
Specifies the highest number allowed for user IDs. All host users which have a higher user ID than that specified by maxuid, and all virtual users running as a host user with a user ID higher than that specified by maxuid, are not permitted to log in. The default behavior is that all IDs are allowed.
ipaccess
str "ipaccess"
Specifies the file containing the access list with the IP addresses which are permitted to log on to "websharesrv".
CacheDir
str "var/tmp/wscache"
Specifies the directory which contains the preview files on the WebShare File Server. It corresponds to the Cache Directory entry in the "WebShare Server Preferences" menu.

Note: This directory must already exist and have rwx
(read-write-execute) permissions for all.

wsadmgroup
str "WSAdm"
Members of the special "WebShare administrators" group can use WebShare to manipulate user and sharepoint configurations from any workstation on the Web.
sysadmgroup
str "SysAdm"
HELIOS allows users with sufficient permissions to configure the WebShare system from any workstation on the Web in a convenient and secure way. For example, it can be used to set up users or sharepoints. Usually, only the system administrator is allowed to make any changes. Non-privileged users can only modify their own user preferences.
Members of the special "system administrators" group can also use the WebShare "Administration" menus to modify WebShare server settings (preferences, users, sharepoints, etc.) from any workstation on the Web. The sysadmgroup parameter specifies the name of the special "system administrators" group.
7.8.2 Sharepoint preference keys
Key: Programs/websharesrv/Shares/<Sharename>/<key>
The following keys take effect immediately:
Path
str ""
Specifies the path of a sharepoint. It corresponds to the Sharepoint Path entry in the "Sharepoint Administration" window.
Publish
bool TRUE
Specifies whether a sharepoint is published in the "Home" menu. The setting reflects that of the Publish checkbox in the "Sharepoint Administration" window.
EmailAccess
str ""
Specifies an e-mail address for notification mails on user access and action to the selected sharepoint. It corresponds to the E-Mail on Access entry in the "Sharepoint Administration" window.

Note: Make sure that the complete receiver account is specified, e.g. webshare@mycompany.com

CollectMails
bool TRUE
Specifies whether notification mails, as stated in the EmailAccess preference, are issued after the users' logout, which is the default behavior, or after each file download, deletion or upload action that has been done by a user.
Comments
str ""
Specifies a comment on the selected sharepoint. It corresponds to the Comments entry in the "Sharepoint Administration" window.
AllowPreview
bool TRUE
Specifies whether previews of images in the sharepoint are allowed. The setting reflects that of the Allow Preview checkbox in the "Sharepoint Administration" window.
AllowDownload
bool FALSE
Specifies whether downloading files from the sharepoint is allowed. The setting reflects that of the Allow Download checkbox in the "Sharepoint Administration" window.
AllowUpload
bool FALSE
Specifies whether uploading files to the sharepoint is allowed. The setting reflects that of the Allow Upload checkbox in the "Sharepoint Administration" window.
AllowRename
bool FALSE
Specifies whether renaming files and directories in the sharepoint is allowed. The setting reflects that of the Allow Rename checkbox in the "Sharepoint Administration" window. Setting this preference allows changing permissions, too.
AllowCopy
bool FALSE
Specifies whether copying files to the sharepoint and creating directories is allowed. The setting reflects that of the Allow Copy checkbox in the "Sharepoint Administration" window.
AllowDelete
bool FALSE
Specifies whether deleting files in the sharepoint is allowed. The setting reflects that of the Allow Delete checkbox in the "Sharepoint Administration" window.
AllRead
bool FALSE
Specifies whether file read access in the sharepoint is enabled for all users, irrespective of the UNIX file access settings. Read access includes file download and preview. The setting reflects that of the Always Allow Reading checkbox in the "Sharepoint Administration" window. This preference must first be enabled by the WebShare administration preference key AllowAllReadWrite.
AllReadWrite
bool FALSE
Specifies whether file read/write access in the sharepoint is enabled for all users, irrespective of the UNIX file access settings. Read/write access includes file download, upload and preview. The setting reflects that of the Always Allow Read/Write checkbox in the "Sharepoint Administration" window. This preference must first be enabled by the WebShare administration preference key AllowAllReadWrite.
OnlyLayouts
bool FALSE
If set to TRUE, only layouts of the images in the sharepoint can be downloaded. The setting reflects that of the Download Layouts only checkbox in the "Sharepoint Administration" window.

Note: For this preference to be enabled, the WebShare File Server preference AllowDownload must also be TRUE.

Users
strlist ""
Specifies one or more user names for which the sharepoint is available. If no names are specified, the sharepoint is available for all users. It corresponds to entries in Allowed Users in the "Sharepoint Administration" window.
Groups
strlist ""
Specifies one or more group names for whose members the sharepoint is available. If no names are specified, the sharepoint is available for all groups. It corresponds to entries in Allowed Groups in the "Sharepoint Administration" window.
For WebShare, the sharepoint (volume) key is the name of the sharepoint, for example "WebShare Public", whereas for EtherShare and PCShare the volume key is the UNIX directory path, for example "/demovol".
To set up a sharepoint "Mycompany Public", similar to the "WebShare Public" by using "prefvalue", the following prefvalue sequences must be called:
bin/prefvalue -k "Programs/websharesrv/Shares/
Mycompany Public/Path" -t str "/mycompany/public/WebShare"

bin/prefvalue -k "Programs/websharesrv/Shares/
Mycompany Public/AllowDownload" -t bool TRUE

bin/prefvalue -k "Programs/websharesrv/Shares/
Mycompany Public/AllowPreview" -t bool TRUE
By default the Publish flag is on, therefore it need not be specified.


© 2004 HELIOS Software GmbH