ftpd conversions database
1 2 3 4 5 6 7 8
1 strip prefix
2 strip postfix
3 addon prefix
4 addon postfix
5 external command
The conversions known by
and their attributes are stored in an ASCII file
that is structured as shown in the ``Format'' section.
Each line in the file provides a description for a single
conversion. Fields are separated by colons (:).
Prefix and postfix
The prefix fields are not currently used. The postfix
fields define extensions to be added or removed from
user-specified filenames. The ``addon postfix'' field is
assumed to have been appended to a real filename and is
removed prior to looking up the file. The ``strip
postfix'' field is appended to the user-supplied filename
prior to looking up the file. This is somewhat
The file name that results is available for use in the
``external command'' field by using the special string
The following types are defined:
A type specification indicates that only files of the
specified type are allowed to be converted. This is used
to prevent transferring of compressed files in binary mode
or attempts to compress directories.
More than one type may be specified by separating them with
the ``|'' character.
Some built-in options are known to the FTP server
and will cause special information to be displayed in the
log file (see
if transfers are being logged. These are:
More than one option may be specified by separating them
with the ``|'' character.
the file was compressed during transfer
the file was tar'd during transfer
the file was uncompressed during transfer.
The following example shows a conversion that causes files
whose names end in ``.tar'' to have their suffix removed.
The resulting filename is used as an argument to the
command. The transfer is not allowed to be performed in
ASCII mode and a special ``tar'' flag will be
written to the transfer log.
: : :.tar:/usr/bin/tar cf - %s:T_REG|T_DIR:O_TAR:TAR
A typical conversions file might look like this:
#strip prefix:strip postfix:addon prefix:addon postfix:external command:
:.Z: : :/usr/bin/compress -d -c %s:T_REG|T_ASCII:O_UNCOMPRESS:UNCOMPRESS
:.gz: : :/usr/bin/gzip -d -c %s:T_REG|T_ASCII:O_UNCOMPRESS:UNCOMPRESS
:.bz2: : :/usr/bin/bzip2 -d -c %s:T_REG|T_ASCII:O_UNCOMPRESS:UNCOMPRESS
:-z: : :/usr/bin/compress -d -c %s:T_REG|T_ASCII:O_UNCOMPRESS:UNCOMPRESS
: : :.Z:/usr/bin/compress -c %s:T_REG:O_COMPRESS:COMPRESS
: : :.gz:/usr/bin/gzip -9 -c %s:T_REG:O_COMPRESS:COMPRESS
: : :.bz2:/usr/bin/bzip2 -9 -c %s:T_REG:O_COMPRESS:COMPRESS
: : :.tar:/usr/bin/tar crf - %s:T_REG|T_DIR:O_TAR:TAR
: : :.tar.Z:/bin/sh -c '/usr/bin/tar crf - %s | /usr/bin/compress':T_REG|T_DIR:O_COMPRESS|O_TAR:TAR+COMPRESS
: : :.tar.gz:/bin/sh -c '/usr/bin/tar crf - %s | /usr/bin/gzip -9':T_REG|T_DIR:O_COMPRESS|O_TAR:TAR+COMPRESS
: : :.tar.bz2:/bin/sh -c '/usr/bin/tar crf - %s | /usr/bin/bzip2 -9':T_REG|T_DIR:O_COMPRESS|O_TAR:TAR+COMPRESS
A copy of every program mentioned in the conversions file must be
included under the ftp home directory (typically noted as
For example, if you use /usr/bin/compress in the conversions file,
then a copy of the compress command must be placed under
© 2007 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 05 June 2007