1ftpconversions(4)                File Formats                ftpconversions(4)
2
3
4

NAME

6       ftpconversions - FTP Server conversions database
7

SYNOPSIS

9       /etc/ftpd/ftpconversions
10
11

DESCRIPTION

13       When the FTP Server, in.ftpd(1M), receives the retrieve (RETR) command,
14       if the specified file does not exist, it  looks  for  a  conversion  to
15       change  an  existing  file  or directory of the same base name into the
16       format requested, subject to the ftpaccess(4) compress and tar capabil‐
17       ities.
18
19
20       The  conversions   and their attributes known by in.ftpd(1M) are stored
21       in an ASCII file of the following format. Each line in  the  file  pro‐
22       vides  a  description  for a single conversion. The fields in this file
23       are separated by colons (:).
24
25         %s:%s:%s:%s:%s:%s:%s:%s
26          1  2  3  4  5  6  7  8
27
28
29
30
31       The fields are described as follows:
32
33       1    Strip prefix.
34
35
36       2    Strip postfix.
37
38
39       3    Addon prefix.
40
41
42       4    Addon postfix.
43
44
45       5    External command.
46
47
48       6    Types.
49
50
51       7    Options.
52
53
54       8    Description.
55
56
57
58       The Strip prefix and Addon prefix fields are not currently supported.
59
60
61       The Strip postfix and addon postfix fields are extensions to  be  added
62       to  or removed from the requested filename in attempting to produce the
63       name of an existing file or directory. When the attempt  succeeds,  the
64       FTP  Server  runs  the external command associated with the conversion.
65       The magic cookie %s in the argument is passed to the command,  replaced
66       with the name of the existing file or directory.
67
68
69       External  command is the absolute pathname of a command to run followed
70       by the appropriate options to carry out the  conversion.  The  standard
71       output  of  the command is sent back in response to the RETR (retrieve)
72       command. For anonymous and guest users to be able to execute  the  com‐
73       mand,  it  must  be  present in their chroot'd hierarchy along with any
74       necessary dynamic libraries.
75
76
77       Types specifies the conversion type. The following  values  are  recog‐
78       nized:
79
80       T_ASCII    ASCII  transfers  are allowed of a file produced by the con‐
81                  version.
82
83
84       T_DIR      Directories can be converted.
85
86
87       T_REG      Regular files can be converted.
88
89
90
91       Options are checked against the ftpaccess(4) compress and tar capabili‐
92       ties  and are recorded in the special-action-flag field that is written
93       to the FTP Server logfile. See xferlog(4). The  following  options  are
94       supported:
95
96       O_COMPRESS      conversion compresses
97
98
99       O_TAR           conversion archives
100
101
102       O_UNCOMPRESS    conversion uncompresses
103
104
105
106       You  can specify more than one option by using "|" to separate options.
107       For example, O_TAR|O_COMPRESS specifies that  the  conversion  archives
108       and compresses.
109
110
111        Description  is  a one word description of the conversion that is used
112       in error messages returned to the FTP client.
113
114
115       Lines that begin with a # sign are treated as  comment  lines  and  are
116       ignored.
117

EXAMPLES

119       Example 1 Compressing a Regular File for Transfer
120
121
122       The following example specifies a conversion which generates filename.Z
123       by compressing an existing file filename. The conversion  can  only  be
124       applied  to  regular files, not directories, and the absence of T_ASCII
125       prevents the resulting file from being transferred in ASCII mode.
126
127
128         : : :.Z:/usr/bin/compress -c %s:T_REG:O_COMPRESS:COMPRESS
129
130
131       Example 2  Uncompressing and Transferring in ASCII Mode
132
133
134       The following example specifies a conversion that takes filename.Z  and
135       uncompresses  it  to produce filename, which then can be transferred in
136       ASCII mode.
137
138
139         :.Z: : :/usr/bin/compress -cd %s:T_REG|T_ASCII:O_UNCOMPRESS:UNCOMPRESS
140
141

FILES

143       /etc/ftpd/ftpconversions
144
145

ATTRIBUTES

147       See attributes(5)  for descriptions of the following attributes:
148
149
150
151
152       ┌─────────────────────────────┬─────────────────────────────┐
153       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
154       ├─────────────────────────────┼─────────────────────────────┤
155       │Availability                 │SUNWftpr                     │
156       └─────────────────────────────┴─────────────────────────────┘
157

SEE ALSO

159       ldd(1), in.ftpd(1M), ftpaccess(4), xferlog(4), attributes(5)
160
161
162
163SunOS 5.11                        1 May 2003                 ftpconversions(4)
Impressum