Debian Codegraph @

doc/howto/DisplayFiles.html

raw symbols SCIP
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>ProFTPD: Display Files</title>
5 </head>
6
7 <body bgcolor=white>
8
9 <hr>
10 <center><h2><b>ProFTPD: <code>Display</code> Files</b></h2></center>
11 <hr>
12
13 <p>
14 ProFTPD supports a number of configuration directives that specify a file
15 whose contents should be displayed to connected clients at various times:
16 <ul>
17 <li>
18 <dt><code>DisplayConnect</code>
19 <dd>Displayed to clients as soon as they connect</dd>
20 </li>
21
22 <p>
23 <li>
24 <dt><code>DisplayLogin</code>
25 <dd>Displayed to clients once they have logged in using the
26 <code>USER</code> and <code>PASS</code> commands</dd>
27 </li>
28
29 <p>
30 <li>
31 <dt><code>DisplayChdir</code>
32 <dd>Displayed to a client whenever it changes into a directory</dd>
33 </li>
34
35 <p>
36 <li>
37 <dt><code>DisplayFileTransfer</code>
38 <dd>Displayed to the client whenever a file is successfully transfer,
39 either uploaded or downloaded</dd>
40 </li>
41
42 <p>
43 <li>
44 <dt><code>DisplayQuit</code>
45 <dd>Displayed to a client when the session ends via the <code>QUIT</code>
46 command</dd>
47 </li>
48 </ul>
49
50 <p>
51 Note the subtle difference between <code>DisplayConnect</code> and
52 <code>DisplayLogin</code>. A <code>DisplayConnect</code> file will be
53 displayed to all clients; this makes it suitable for server banners,
54 messages of the day, <i>etc</i>. A <code>DisplayLogin</code> file will only
55 be displayed once the client has logged in.
56
57 <p>
58 The configured file paths can be either relative or absolute (except in the
59 case of <code>DisplayConnect</code>, which always requires absolute paths).
60 In the case of a relative path, the file is assumed to be in the starting
61 directory a user, <i>i.e.</i> the <code>&lt;Anonymous&gt;</code> directory
62 for anonymous logins, and the user's home directory for non-anonymous logins.
63 <b>Note</b>: If <code>DefaultRoot</code> is in effect, then the file
64 <b>must</b> reside inside the <code>chroot</code>ed directory. If the
65 configured file cannot be found or accessed, no error occurs and nothing is
66 logged or displayed to the client.
67
68 <p>
69 <b><code>Display</code> Variables</b><br>
70 The following table contains the variables that can be used in
71 <code>Display</code> files. Be aware that not all of these may have a rational
72 value, depending on the context in which they are used (<i>e.g.</i>,
73 <code>%u</code> if <code>IdentLookups</code> are <em>off</em>).
74
75 <p>
76 Other <code>contrib</code> modules may provide additional variables for use
77 as well; please consult their documentation for more information.
78
79 <p>
80 <table border=1 summary="Display Variables">
81 <tr>
82 <td><b>Variable</b></td>
83 <td><b>Meaning</b></td>
84 </tr>
85
86 <tr>
87 <td>%C</td>
88 <td>Current working directory</td>
89 </tr>
90
91 <tr>
92 <td>%E</td>
93 <td>Server admin's email address</td>
94 </tr>
95
96 <tr>
97 <td>%F</td>
98 <td>Available space on file system, in KB</td>
99 <tr>
100
101 <tr>
102 <td>%f</td>
103 <td>Available space on file system, with units</td>
104 </tr>
105
106 <tr>
107 <td>%i</td>
108 <td>The number of files uploaded (input) in this session</td>
109 </tr>
110
111 <tr>
112 <td>%K</td>
113 <td>Total number of bytes transferred</td>
114 </tr>
115
116 <tr>
117 <td>%k</td>
118 <td>Total number of bytes transferred, in units</td>
119 </tr>
120
121 <tr>
122 <td>%L</td>
123 <td>Local hostname</td>
124 </tr>
125
126 <tr>
127 <td>%M</td>
128 <td>Maximum number of connections</td>
129 </tr>
130
131 <tr>
132 <td>%N</td>
133 <td>Current number of connections</td>
134 </tr>
135
136 <tr>
137 <td>%o</td>
138 <td>The number of files downloaded (output) in this session</td>
139 </tr>
140
141 <tr>
142 <td>%R</td>
143 <td>Remote hostname</td>
144 </tr>
145
146 <tr>
147 <td>%T</td>
148 <td>Current time</td>
149 </tr>
150
151 <tr>
152 <td>%t</td>
153 <td>The number of files transferred (uploaded and downloaded) in this session</td>
154 </tr>
155
156 <tr>
157 <td>%U</td>
158 <td>Username originally used to login</td>
159 </tr>
160
161 <tr>
162 <td>%u</td>
163 <td>Username reported by ident protocol</td>
164 </tr>
165
166 <tr>
167 <td>%V</td>
168 <td><code>ServerName</code> of virtual host, if any</td>
169 </tr>
170
171 <tr>
172 <td>%x</td>
173 <td>The name of the user's <code>Class</code>, if any</td>
174 </tr>
175
176 <tr>
177 <td>%y</td>
178 <td>Current number of connections from the user's <code>Class</code></td>
179 </tr>
180
181 <tr>
182 <td>%z</td>
183 <td>Maximum number of connections from the user's <code>Class</code></td>
184 </tr>
185
186 <tr>
187 <td>%{total_bytes_in}</td>
188 <td>The number of bytes uploaded (input) in this session</td>
189 </tr>
190
191 <tr>
192 <td>%{total_bytes_out}</td>
193 <td>The number of bytes downloaded (output) in this session</td>
194 </tr>
195
196 <tr>
197 <td>%{total_bytes_xfer}</td>
198 <td>The number of bytes transferred (uploaded and downloaded) in this session</td>
199 </tr>
200
201 <tr>
202 <td>%{total_files_in}</td>
203 <td>The number of files uploaded (input) in this session</td>
204 </tr>
205
206 <tr>
207 <td>%{total_files_out}</td>
208 <td>The number of files downloaded (output) in this session</td>
209 </tr>
210
211 <tr>
212 <td>%{total_files_xfer}</td>
213 <td>The number of files transferred (uploaded and downloaded) in this session</td>
214 </tr>
215
216 <tr>
217 <td>%{env:<i>name</i>}</td>
218 <td>The value of the environment variable <i>name</i></td>
219 </tr>
220
221 <tr>
222 <td>%{time:<i>format</i>}</td>
223 <td>Uses <i>format</i> (as per the <code>strftime(3)</code> function) to format a timestamp</td>
224 </tr>
225 </table>
226
227 <p><a name="FAQ"></a>
228 <b>Frequently Asked Questions</b><br>
229
230 <p><a name="DisplayPathsWithSpaces">
231 <font color=red>Question</font>: I configured a path which contains spaces for
232 <code>DisplayLogin</code>, and it doesn't work. Why not?<br>
233 <font color=blue>Answer</font>: If using paths/files which contains spaces,
234 make sure that you enclose the path in quotation marks, <i>e.g.</i>:
235 <pre>
236 DisplayLogin "/path/to/display login.txt"
237 </pre>
238 Otherwise, the configuration file parser will treat the space-separated
239 portions of the path as separate directive parameters.
240
241 <p><a name="DisplayAvailableBytes">
242 <font color=red>Question</font>: I configured a <code>DisplayLogin</code>
243 file which uses the <code>%F</code> variable, but it is not showing me the
244 correct amount of bytes available on my system. Why not?<br>
245 <font color=blue>Answer</font>: ProFTPD determines the available bytes for
246 the <code>%F</code>/<code>%f</code> variables <i>based on the filesystem
247 containing the <code>Display</code> file</i>.
248
249 <p>
250 For example, if your <code>Display</code> file is in <code>/etc/proftpd</code>,,
251 and the <code>/etc</code> directory is mounted on a small disk, then
252 <code>%F</code>/<code>%f</code> will only report on the bytes available in the
253 <code>/etc</code> filesystem, not on other filesystems (<i>e.g.</i> not
254 the <code>/home</code> filesystem).
255
256 <br><hr>
257 <font size=2><b><i>
258 &copy; Copyright 2012-2017 The ProFTPD Project<br>
259 All Rights Reserved<br>
260 </i></b></font>
261 <hr>
262
263 </body>
264 </html>