-
Notifications
You must be signed in to change notification settings - Fork 18
/
gesftpserver.8.in
117 lines (117 loc) · 3.99 KB
/
gesftpserver.8.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
.\" This file is part of the Green End SFTP Server.
.\" Copyright (C) 2007, 2011 Richard Kettlewell
.\"
.\" This program is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation; either version 2 of the License, or
.\" (at your option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful, but
.\" WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
.\" General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with this program; if not, write to the Free Software
.\" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
.\" USA
.TH gesftpserver 8
.SH NAME
gesftpserver - Green End SFTP Server
.SH SYNOPSIS
.B __libexecdir__/gesftpserver
.RI [OPTIONS]
.SH DESCRIPTION
.B gesftpserver
implements the SFTP protocol. It is normally run as an SSH subsystem
but can be run in other contexts if necessary.
.SH "CONFIGURING OPENSSH"
By default, OpenSSH will use its native SFTP server in response to
requests for the SFTP subsystem. To use gesftpserver instead, add a
suitable
.B Subsystem
command to
.I sshd_config
(and remove the existing one if present). For example:
.PP
.nf
Subsystem sftp __libexecdir__/gesftpserver
.fi
.SH CONFIGURATION
The SFTP server reads an (optional) configuration file, \fI/etc//etc/gesftpserver.conf\fR.
.PP
Within this file:
.IP \(bu
Comments are introduced with \fB#\fR.
.IP \(bu
Words are separated by spaces or tabs.
.IP \(bu
Words can be quoted with single or double quotes.
.IP \(bu
Within quotes, the backslash escapes the following character.
.PP
The supported configuration directives are:
.TP
.B reorder \fBtrue\fR|\fBfalse\fR
Enable or disable request re-ordering.
The default is \fBtrue\fR.
See below for more information.
.TP
.B threads \fInthreads\fR
Sets the number of threads to use.
The default is a matter of build-time configuration, but usually 4.
.SH "IMPLEMENTATION DETAILS"
.SS Extensions
.B gesftpserver
supports up to version 6 of the SFTP protocol and the following
extensions:
.TP
.B newline
Reports the server's newline convention to the client.
.TP
.B space-available
Equivalent to
.BR df (1).
.TP
.B supported
v5 capability details
.TP
.B supported2
v6 capability details
.TP
.B text-seek
Used for resuming text file downloads.
.TP
.B vendor-id
Reports server name and version to client.
.B gesftpserver
reports a vendor of "Green End" and a server name of "Green End SFTP Server".
.TP
.B versions
Lists available versions.
.TP
.B version-select
Select version.
.TP
Provides POSIX rename semantics even in pre-v5 SFTP.
.SS Concurrency
By default the server runs multiple threads, meaning that responses may not match necessarily request order.
.PP
This is permitted by the SFTP protocol spec, and is intended as an optimization:
if a client has sent multiple requests without waiting for the corresponding responses,
then it means that a slow request (e.g. requiring a round trip to a physical storage) need not delay a fast one (e.g. satisfiable from a cache).
.PP
However some clients contain a bug in which they assume response order matches request order,
rather than using request identifiers to match any requests and responses.
Of course these clients must be fixed, but until a fixed version is deployed,
the server can be instructed to suppress re-ordering by putting \fBreorder false\fR in the configuration file.
.PP
Note that this will not prevent concurrent IO:
rather, it will cause responses to be held in a queue until they can be sent without reordering.
To prevent concurrent IO completely, use \fBthreads 1\fR.
.PP
It's envisaged that re-ordering is most likely when one or more files are accessed in a random-access fashion.
However, empirically, thread or IO scheduling behavior can lead to re-ordering even for single-file sequential IO.
.SH "SEE ALSO"
.BR sshd_config (5)