Initial import from FreeBSD RELENG_4:
[dragonfly.git] / crypto / heimdal / appl / ftp / ftpd / ftpd.cat8
1 FTPD(8)                 NetBSD System Manager's Manual                 FTPD(8)
2
3 N\bNA\bAM\bME\bE
4      f\bft\btp\bpd\bd - Internet File Transfer Protocol server
5
6 S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
7      f\bft\btp\bpd\bd [-\b-a\ba _\ba_\bu_\bt_\bh_\bm_\bo_\bd_\be] [-\b-d\bdi\bil\blv\bvU\bU] [-\b-g\bg _\bu_\bm_\ba_\bs_\bk] [-\b-p\bp _\bp_\bo_\br_\bt] [-\b-T\bT _\bm_\ba_\bx_\bt_\bi_\bm_\be_\bo_\bu_\bt] [-\b-t\bt
8      _\bt_\bi_\bm_\be_\bo_\bu_\bt] [-\b-u\bu _\bd_\be_\bf_\ba_\bu_\bl_\bt _\bu_\bm_\ba_\bs_\bk] [-\b-B\bB | -\b--\b-b\bbu\bui\bil\blt\bti\bin\bn-\b-l\bls\bs] [-\b--\b-g\bgo\boo\bod\bd-\b-c\bch\bha\bar\brs\bs=\b=_\bs_\bt_\br_\bi_\bn_\bg]
9
10 D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
11      F\bFt\btp\bpd\bd is the Internet File Transfer Protocol server process.  The server
12      uses the TCP protocol and listens at the port specified in the ``ftp''
13      service specification; see services(5).
14
15      Available options:
16
17      -\b-a\ba      Select the level of authentication required.  Kerberised login
18              can not be turned off. The default is to only allow kerberised
19              login.  Other possibilities can be turned on by giving a string
20              of comma separated flags as argument to -\b-a\ba. Recognised flags are:
21
22              _\bp_\bl_\ba_\bi_\bn  Allow logging in with plaintext password. The password can
23                     be a(n) OTP or an ordinary password.
24
25              _\bo_\bt_\bp    Same as _\bp_\bl_\ba_\bi_\bn, but only OTP is allowed.
26
27              _\bf_\bt_\bp    Allow anonymous login.
28
29              The following combination modes exists for backwards compatibili-
30              ty:
31
32              _\bn_\bo_\bn_\be   Same as _\bp_\bl_\ba_\bi_\bn_\b,_\bf_\bt_\bp.
33
34              _\bs_\ba_\bf_\be   Same as _\bf_\bt_\bp.
35
36              _\bu_\bs_\be_\br   Ignored.
37
38      -\b-d\bd      Debugging information is written to the syslog using LOG_FTP.
39
40      -\b-g\bg      Anonymous users will get a umask of _\bu_\bm_\ba_\bs_\bk.
41
42      -\b-i\bi      Open a socket and wait for a connection. This is mainly used for
43              debugging when ftpd isn't started by inetd.
44
45      -\b-l\bl      Each successful and failed ftp(1) session is logged using syslog
46              with a facility of LOG_FTP.  If this option is specified twice,
47              the retrieve (get), store (put), append, delete, make directory,
48              remove directory and rename operations and their filename argu-
49              ments are also logged.
50
51      -\b-p\bp      Use _\bp_\bo_\br_\bt (a service name or number) instead of the default
52              _\bf_\bt_\bp_\b/_\bt_\bc_\bp.
53
54      -\b-T\bT      A client may also request a different timeout period; the maximum
55              period allowed may be set to _\bt_\bi_\bm_\be_\bo_\bu_\bt seconds with the -\b-T\bT option.
56              The default limit is 2 hours.
57
58      -\b-t\bt      The inactivity timeout period is set to _\bt_\bi_\bm_\be_\bo_\bu_\bt seconds (the de-
59              fault is 15 minutes).
60
61      -\b-u\bu      Set the initial umask to something else than the default 027.
62
63      -\b-U\bU      In previous versions of f\bft\btp\bpd\bd, when a passive mode client request-
64              ed a data connection to the server, the server would use data
65              ports in the range 1024..4999.  Now, by default, if the system
66              supports the IP_PORTRANGE socket option, the server will use data
67              ports in the range 49152..65535.  Specifying this option will re-
68              vert to the old behavior.
69
70      -\b-v\bv      Verbose mode.
71
72      -\b-B\bB, -\b--\b-b\bbu\bui\bil\blt\bti\bin\bn-\b-l\bls\bs
73              use built-in ls to list files
74
75      -\b--\b-g\bgo\boo\bod\bd-\b-c\bch\bha\bar\brs\bs=\b=_\bs_\bt_\br_\bi_\bn_\bg
76              allowed anonymous upload filename chars
77
78      The file _\b/_\be_\bt_\bc_\b/_\bn_\bo_\bl_\bo_\bg_\bi_\bn can be used to disable ftp access.  If the file ex-
79      ists, f\bft\btp\bpd\bd displays it and exits.  If the file _\b/_\be_\bt_\bc_\b/_\bf_\bt_\bp_\bw_\be_\bl_\bc_\bo_\bm_\be exists,
80      f\bft\btp\bpd\bd prints it before issuing the ``ready'' message.  If the file
81      _\b/_\be_\bt_\bc_\b/_\bm_\bo_\bt_\bd exists, f\bft\btp\bpd\bd prints it after a successful login.
82
83      The ftp server currently supports the following ftp requests.  The case
84      of the requests is ignored.
85
86            Request    Description
87            ABOR       abort previous command
88            ACCT       specify account (ignored)
89            ALLO       allocate storage (vacuously)
90            APPE       append to a file
91            CDUP       change to parent of current working directory
92            CWD        change working directory
93            DELE       delete a file
94            HELP       give help information
95            LIST       give list files in a directory (``ls -lgA'')
96            MKD        make a directory
97            MDTM       show last modification time of file
98            MODE       specify data transfer _\bm_\bo_\bd_\be
99            NLST       give name list of files in directory
100            NOOP       do nothing
101            PASS       specify password
102            PASV       prepare for server-to-server transfer
103            PORT       specify data connection port
104            PWD        print the current working directory
105            QUIT       terminate session
106            REST       restart incomplete transfer
107            RETR       retrieve a file
108            RMD        remove a directory
109            RNFR       specify rename-from file name
110            RNTO       specify rename-to file name
111            SITE       non-standard commands (see next section)
112            SIZE       return size of file
113            STAT       return status of server
114            STOR       store a file
115            STOU       store a file with a unique name
116            STRU       specify data transfer _\bs_\bt_\br_\bu_\bc_\bt_\bu_\br_\be
117            SYST       show operating system type of server system
118            TYPE       specify data transfer _\bt_\by_\bp_\be
119            USER       specify user name
120            XCUP       change to parent of current working directory
121                       (deprecated)
122            XCWD       change working directory (deprecated)
123            XMKD       make a directory (deprecated)
124            XPWD       print the current working directory (deprecated)
125            XRMD       remove a directory (deprecated)
126
127      The following commands are specified by RFC2228.
128
129            AUTH       authentication/security mechanism
130            ADAT       authentication/security data
131            PROT       data channel protection level
132            PBSZ       protection buffer size
133            MIC        integrity protected command
134            CONF       confidentiality protected command
135            ENC        privacy protected command
136            CCC        clear command channel
137
138      The following non-standard or UNIX specific commands are supported by the
139      SITE request.
140
141            UMASK      change umask, (e.g.  S\bSI\bIT\bTE\bE U\bUM\bMA\bAS\bSK\bK 0\b00\b02\b2)
142            IDLE       set idle-timer, (e.g.  S\bSI\bIT\bTE\bE I\bID\bDL\bLE\bE 6\b60\b0)
143            CHMOD      change mode of a file (e.g.  S\bSI\bIT\bTE\bE C\bCH\bHM\bMO\bOD\bD 7\b75\b55\b5 f\bfi\bil\ble\ben\bna\bam\bme\be)
144            FIND       quickly find a specific file with GNU locate(1).
145            HELP       give help information.
146
147      The following Kerberos related site commands are understood.
148
149            KAUTH      obtain remote tickets.
150            KLIST      show remote tickets
151
152      The remaining ftp requests specified in Internet RFC 959 are recognized,
153      but not implemented.  MDTM and SIZE are not specified in RFC 959, but
154      will appear in the next updated FTP RFC.
155
156      The ftp server will abort an active file transfer only when the ABOR com-
157      mand is preceded by a Telnet "Interrupt Process" (IP) signal and a Telnet
158      "Synch" signal in the command Telnet stream, as described in Internet RFC
159      959.  If a STAT command is received during a data transfer, preceded by a
160      Telnet IP and Synch, transfer status will be returned.
161
162      F\bFt\btp\bpd\bd interprets file names according to the ``globbing'' conventions used
163      by csh(1).  This allows users to utilize the metacharacters ``*?[]{}~''.
164
165      F\bFt\btp\bpd\bd authenticates users according to these rules.
166
167            1.   If Kerberos authentication is used, the user must pass valid
168                 tickets and the principal must be allowed to login as the re-
169                 mote user.
170
171            2.   The login name must be in the password data base, and not have
172                 a null password (if kerberos is used the password field is not
173                 checked).  In this case a password must be provided by the
174                 client before any file operations may be performed.  If the
175                 user has an OTP key, the response from a successful USER com-
176                 mand will include an OTP challenge. The client may choose to
177                 respond with a PASS command giving either a standard password
178                 or an OTP one-time password. The server will automatically de-
179                 termine which type of password it has been given and attempt
180                 to authenticate accordingly. See otp(1) for more information
181                 on OTP authentication.
182
183            3.   The login name must not appear in the file _\b/_\be_\bt_\bc_\b/_\bf_\bt_\bp_\bu_\bs_\be_\br_\bs.
184
185            4.   The user must have a standard shell returned by
186                 getusershell(3).
187
188            5.   If the user name appears in the file _\b/_\be_\bt_\bc_\b/_\bf_\bt_\bp_\bc_\bh_\br_\bo_\bo_\bt the ses-
189                 sion's root will be changed to the user's login directory by
190                 chroot(2) as for an ``anonymous'' or ``ftp'' account (see next
191                 item).  However, the user must still supply a password.  This
192                 feature is intended as a compromise between a fully anonymous
193                 account and a fully privileged account.  The account should
194                 also be set up as for an anonymous account.
195
196            6.   If the user name is ``anonymous'' or ``ftp'', an anonymous ftp
197                 account must be present in the password file (user ``ftp'').
198                 In this case the user is allowed to log in by specifying any
199                 password (by convention an email address for the user should
200                 be used as the password).
201
202      In the last case, f\bft\btp\bpd\bd takes special measures to restrict the client's
203      access privileges.  The server performs a chroot(2) to the home directory
204      of the ``ftp'' user.  In order that system security is not breached, it
205      is recommended that the ``ftp'' subtree be constructed with care, consid-
206      er following these guidelines for anonymous ftp.
207
208      In general all files should be owned by ``root'', and have non-write per-
209      missions (644 or 755 depending on the kind of file). No files should be
210      owned or writable by ``ftp'' (possibly with exception for the
211      _\b~_\bf_\bt_\bp_\b/_\bi_\bn_\bc_\bo_\bm_\bi_\bn_\bg, as specified below).
212
213            _\b~_\bf_\bt_\bp      The ``ftp'' homedirectory should be owned by root.
214
215            _\b~_\bf_\bt_\bp_\b/_\bb_\bi_\bn  The directory for external programs (such as ls(1)).
216                      These programs must either be statically linked, or you
217                      must setup an environment for dynamic linking when run-
218                      ning chrooted.  These programs will be used if present:
219
220                            ls      Used when listing files.
221
222                            compress
223                                    When retrieving a filename that ends in _\b._\bZ,
224                                    and that file isn't present, f\bft\btp\bpd\bd will try
225                                    to find the filename without _\b._\bZ and com-
226                                    press it on the fly.
227
228                            gzip    Same as compress, just with files ending in
229                                    _\b._\bg_\bz.
230
231                            gtar    Enables retrieval of whole directories as
232                                    files ending in _\b._\bt_\ba_\br.  Can also be combined
233                                    with compression. You must use GNU Tar (or
234                                    some other that supports the -\b-z\bz and -\b-Z\bZ
235                                    flags).
236
237                            locate  Will enable ``fast find'' with the S\bSI\bIT\bTE\bE
238                                    F\bFI\bIN\bND\bD command. You must also create a
239                                    _\bl_\bo_\bc_\ba_\bt_\be_\bd_\bb file in _\b~_\bf_\bt_\bp_\b/_\be_\bt_\bc.
240
241            _\b~_\bf_\bt_\bp_\b/_\be_\bt_\bc  If you put copies of the passwd(5) and group(5) files
242                      here, ls will be able to produce owner names rather than
243                      numbers. Remember to remove any passwords from these
244                      files.
245
246                      The file _\bm_\bo_\bt_\bd, if present, will be printed after a suc-
247                      cessful login.
248
249            _\b~_\bf_\bt_\bp_\b/_\bd_\be_\bv  Put a copy of /dev/null(7) here.
250
251            _\b~_\bf_\bt_\bp_\b/_\bp_\bu_\bb  Traditional place to put whatever you want to make pub-
252                      lic.
253
254      If you want guests to be able to upload files, create a _\b~_\bf_\bt_\bp_\b/_\bi_\bn_\bc_\bo_\bm_\bi_\bn_\bg di-
255      rectory owned by ``root'', and group ``ftp'' with mode 730 (make sure
256      ``ftp'' is member of group ``ftp'').  The following restrictions apply to
257      anonymous users:
258
259      +\b+\bo\bo   Directories created will have mode 700.
260
261      +\b+\bo\bo   Uploaded files will be created with an umask of 777, if not changed
262          with the -\b-g\bg option.
263
264      +\b+\bo\bo   These command are not accessible: D\bDE\bEL\bLE\bE, R\bRM\bMD\bD, R\bRN\bNT\bTO\bO, R\bRN\bNF\bFR\bR, S\bSI\bIT\bTE\bE U\bUM\bMA\bAS\bSK\bK,
265          and S\bSI\bIT\bTE\bE C\bCH\bHM\bMO\bOD\bD.
266
267      +\b+\bo\bo   Filenames must start with an alpha-numeric character, and consist of
268          alpha-numeric characters or any of the following: + (plus), - (mi-
269          nus), = (equal), _ (underscore), .  (period), and , (comma).
270
271 F\bFI\bIL\bLE\bES\bS
272      /etc/ftpusers    Access list for users.
273      /etc/ftpchroot   List of normal users who should be chroot'd.
274      /etc/ftpwelcome  Welcome notice.
275      /etc/motd        Welcome notice after login.
276      /etc/nologin     Displayed and access refused.
277      ~/.klogin        Login access for Kerberos.
278
279 S\bSE\bEE\bE A\bAL\bLS\bSO\bO
280      ftp(1), otp(1), getusershell(3), ftpusers(5), syslogd(8)
281
282 S\bST\bTA\bAN\bND\bDA\bAR\bRD\bDS\bS
283      R\bRF\bFC\bC 9\b95\b59\b9   FTP PROTOCOL SPECIFICATION
284      R\bRF\bFC\bC 1\b19\b93\b38\b8  OTP Specification
285      R\bRF\bFC\bC 2\b22\b22\b28\b8  FTP Security Extensions.
286
287 B\bBU\bUG\bGS\bS
288      The server must run as the super-user to create sockets with privileged
289      port numbers.  It maintains an effective user id of the logged in user,
290      reverting to the super-user only when binding addresses to sockets.  The
291      possible security holes have been extensively scrutinized, but are possi-
292      bly incomplete.
293
294 H\bHI\bIS\bST\bTO\bOR\bRY\bY
295      The f\bft\btp\bpd\bd command appeared in 4.2BSD.
296
297 4.2 Berkeley Distribution       April 19, 1997                               5