summaryrefslogtreecommitdiff
path: root/usr/src/man/man4/ftpconversions.4
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/man/man4/ftpconversions.4')
-rw-r--r--usr/src/man/man4/ftpconversions.4284
1 files changed, 284 insertions, 0 deletions
diff --git a/usr/src/man/man4/ftpconversions.4 b/usr/src/man/man4/ftpconversions.4
new file mode 100644
index 0000000000..d991aa73e9
--- /dev/null
+++ b/usr/src/man/man4/ftpconversions.4
@@ -0,0 +1,284 @@
+'\" te
+.\" Copyright (C) 2001, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ftpconversions 4 "1 May 2003" "SunOS 5.11" "File Formats"
+.SH NAME
+ftpconversions \- FTP Server conversions database
+.SH SYNOPSIS
+.LP
+.nf
+\fB/etc/ftpd/ftpconversions\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+When the FTP Server, \fBin.ftpd\fR(1M), receives the retrieve (\fBRETR\fR)
+command, if the specified file does not exist, it looks for a conversion to
+change an existing file or directory of the same base name into the format
+requested, subject to the \fBftpaccess\fR(4) \fBcompress\fR and \fBtar\fR
+capabilities.
+.sp
+.LP
+The conversions and their attributes known by \fBin.ftpd\fR(1M) are stored in
+an \fBASCII\fR file of the following format. Each line in the file provides a
+description for a single conversion. The fields in this file are separated by
+colons (:).
+.sp
+.in +2
+.nf
+%s:%s:%s:%s:%s:%s:%s:%s
+ 1 2 3 4 5 6 7 8
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The fields are described as follows:
+.sp
+.ne 2
+.mk
+.na
+\fB1\fR
+.ad
+.RS 5n
+.rt
+\fBStrip prefix\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB2\fR
+.ad
+.RS 5n
+.rt
+\fBStrip postfix\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB3\fR
+.ad
+.RS 5n
+.rt
+\fBAddon prefix\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB4\fR
+.ad
+.RS 5n
+.rt
+\fBAddon postfix\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB5\fR
+.ad
+.RS 5n
+.rt
+\fBExternal command\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB6\fR
+.ad
+.RS 5n
+.rt
+\fBTypes\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB7\fR
+.ad
+.RS 5n
+.rt
+\fBOptions\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB8\fR
+.ad
+.RS 5n
+.rt
+\fBDescription\fR.
+.RE
+
+.sp
+.LP
+The \fBStrip prefix\fR and \fBAddon prefix\fR fields are not currently
+supported.
+.sp
+.LP
+The \fBStrip postfix\fR and \fBaddon postfix\fR fields are extensions to be
+added to or removed from the requested \fBfilename\fR in attempting to produce
+the name of an existing file or directory. When the attempt succeeds, the FTP
+Server runs the external command associated with the conversion. The magic
+cookie \fB%s\fR in the argument is passed to the command, replaced with the
+name of the existing file or directory.
+.sp
+.LP
+\fBExternal command\fR is the absolute pathname of a command to run followed by
+the appropriate options to carry out the conversion. The standard output of the
+command is sent back in response to the \fBRETR\fR (retrieve) command. For
+anonymous and guest users to be able to execute the command, it must be present
+in their \fBchroot'd\fR hierarchy along with any necessary dynamic libraries.
+.sp
+.LP
+\fBTypes\fR specifies the conversion type. The following values are recognized:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBT_ASCII\fR\fR
+.ad
+.RS 11n
+.rt
+ASCII transfers are allowed of a file produced by the conversion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\fR\fBT_DIR\fR\fR
+.ad
+.RS 11n
+.rt
+Directories can be converted.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBT_REG\fR\fR
+.ad
+.RS 11n
+.rt
+Regular files can be converted.
+.RE
+
+.sp
+.LP
+\fBOptions\fR are checked against the \fBftpaccess\fR(4) \fBcompress\fR and
+\fBtar\fR capabilities and are recorded in the \fBspecial-action-flag\fR field
+that is written to the FTP Server logfile. See \fBxferlog\fR(4). The following
+options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBO_COMPRESS\fR\fR
+.ad
+.RS 16n
+.rt
+conversion compresses
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBO_TAR\fR\fR
+.ad
+.RS 16n
+.rt
+conversion archives
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBO_UNCOMPRESS\fR\fR
+.ad
+.RS 16n
+.rt
+conversion uncompresses
+.RE
+
+.sp
+.LP
+You can specify more than one option by using "\fB|\fR" to separate options.
+For example, \fBO_TAR|O_COMPRESS\fR specifies that the conversion archives and
+compresses.
+.sp
+.LP
+ \fBDescription\fR is a one word description of the conversion that is used in
+error messages returned to the FTP client.
+.sp
+.LP
+Lines that begin with a \fB#\fR sign are treated as comment lines and are
+ignored.
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRCompressing a Regular File for Transfer
+.sp
+.LP
+The following example specifies a conversion which generates \fBfilename.Z\fR
+by compressing an existing file \fBfilename\fR. The conversion can only be
+applied to regular files, not directories, and the absence of \fBT_ASCII\fR
+prevents the resulting file from being transferred in ASCII mode.
+
+.sp
+.in +2
+.nf
+: : :.Z:/usr/bin/compress -c %s:T_REG:O_COMPRESS:COMPRESS
+.fi
+.in -2
+
+.LP
+\fBExample 2 \fR Uncompressing and Transferring in ASCII Mode
+.sp
+.LP
+The following example specifies a conversion that takes \fBfilename.Z\fR and
+uncompresses it to produce \fBfilename\fR, which then can be transferred in
+ASCII mode.
+
+.sp
+.in +2
+.nf
+:.Z: : :/usr/bin/compress -cd %s:T_REG|T_ASCII:O_UNCOMPRESS:UNCOMPRESS
+.fi
+.in -2
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/ftpd/ftpconversions\fR\fR
+.ad
+.RS 28n
+.rt
+
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBldd\fR(1), \fBin.ftpd\fR(1M), \fBftpaccess\fR(4), \fBxferlog\fR(4),
+\fBattributes\fR(5)