Commit | Line | Data |
---|---|---|
43c671de KB |
1 | .\" Copyright (c) 1985 The Regents of the University of California. |
2 | .\" All rights reserved. | |
917eb9fe | 3 | .\" |
43c671de KB |
4 | .\" Redistribution and use in source and binary forms are permitted |
5 | .\" provided that the above copyright notice and this paragraph are | |
6 | .\" duplicated in all such forms and that any documentation, | |
7 | .\" advertising materials, and other materials related to such | |
8 | .\" distribution and use acknowledge that the software was developed | |
9 | .\" by the University of California, Berkeley. The name of the | |
10 | .\" University may not be used to endorse or promote products derived | |
11 | .\" from this software without specific prior written permission. | |
12 | .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR | |
13 | .\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED | |
14 | .\" WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
917eb9fe | 15 | .\" |
43c671de KB |
16 | .\" @(#)ftpd.8 6.5 (Berkeley) %G% |
17 | .\" | |
18 | .TH FTPD 8 "" | |
917eb9fe KM |
19 | .UC 5 |
20 | .SH NAME | |
21 | ftpd \- DARPA Internet File Transfer Protocol server | |
22 | .SH SYNOPSIS | |
23 | .B /etc/ftpd | |
24 | [ | |
25 | .B \-d | |
26 | ] [ | |
27 | .B \-l | |
28 | ] [ | |
29 | .BR \-t timeout | |
30 | ] | |
31 | .SH DESCRIPTION | |
32 | .I Ftpd | |
33 | is the DARPA Internet File Transfer Prototocol | |
34 | server process. The server uses the TCP protocol | |
35 | and listens at the port specified in the ``ftp'' | |
36 | service specification; see | |
37 | .IR services (5). | |
38 | .PP | |
39 | If the | |
40 | .B \-d | |
41 | option is specified, | |
2c32d7db | 42 | debugging information is written to the syslog. |
917eb9fe KM |
43 | .PP |
44 | If the | |
45 | .B \-l | |
46 | option is specified, | |
2c32d7db | 47 | each ftp session is logged in the syslog. |
917eb9fe KM |
48 | .PP |
49 | The ftp server | |
2c32d7db | 50 | will timeout an inactive session after 15 minutes. |
917eb9fe KM |
51 | If the |
52 | .B \-t | |
53 | option is specified, | |
54 | the inactivity timeout period will be set to | |
55 | .IR timeout . | |
56 | .PP | |
57 | The ftp server currently supports the following ftp | |
58 | requests; case is not distinguished. | |
59 | .PP | |
60 | .nf | |
61 | .ta \w'Request 'u | |
62 | \fBRequest Description\fP | |
1bd029de | 63 | ABOR abort previous command |
917eb9fe KM |
64 | ACCT specify account (ignored) |
65 | ALLO allocate storage (vacuously) | |
66 | APPE append to a file | |
1bd029de | 67 | CDUP change to parent of current working directory |
917eb9fe KM |
68 | CWD change working directory |
69 | DELE delete a file | |
70 | HELP give help information | |
71 | LIST give list files in a directory (``ls -lg'') | |
1bd029de | 72 | MKD make a directory |
917eb9fe KM |
73 | MODE specify data transfer \fImode\fP |
74 | NLST give name list of files in directory (``ls'') | |
75 | NOOP do nothing | |
76 | PASS specify password | |
1bd029de | 77 | PASV prepare for server-to-server transfer |
917eb9fe | 78 | PORT specify data connection port |
1bd029de | 79 | PWD print the current working directory |
917eb9fe KM |
80 | QUIT terminate session |
81 | RETR retrieve a file | |
1bd029de | 82 | RMD remove a directory |
917eb9fe KM |
83 | RNFR specify rename-from file name |
84 | RNTO specify rename-to file name | |
85 | STOR store a file | |
1bd029de | 86 | STOU store a file with a unique name |
917eb9fe KM |
87 | STRU specify data transfer \fIstructure\fP |
88 | TYPE specify data transfer \fItype\fP | |
89 | USER specify user name | |
90 | XCUP change to parent of current working directory | |
91 | XCWD change working directory | |
92 | XMKD make a directory | |
93 | XPWD print the current working directory | |
94 | XRMD remove a directory | |
95 | .fi | |
96 | .PP | |
1bd029de | 97 | The remaining ftp requests specified in Internet RFC 959 are |
917eb9fe KM |
98 | recognized, but not implemented. |
99 | .PP | |
1bd029de GM |
100 | The ftp server will abort an active file transfer only when the |
101 | ABOR command is preceded by a Telnet "Interrupt Process" (IP) | |
102 | signal and a Telnet "Synch" signal in the command Telnet stream, | |
103 | as described in Internet RFC 959. | |
104 | .PP | |
917eb9fe KM |
105 | .I Ftpd |
106 | interprets file names according to the ``globbing'' | |
107 | conventions used by | |
108 | .IR csh (1). | |
109 | This allows users to utilize the metacharacters ``*?[]{}~''. | |
110 | .PP | |
111 | .I Ftpd | |
112 | authenticates users according to three rules. | |
113 | .IP 1) | |
114 | The user name must be in the password data base, | |
115 | .IR /etc/passwd , | |
116 | and not have a null password. In this case a password | |
117 | must be provided by the client before any file operations | |
118 | may be performed. | |
119 | .IP 2) | |
120 | The user name must not appear in the file | |
121 | .IR /etc/ftpusers . | |
122 | .IP 3) | |
06e77c11 KM |
123 | The user must have a standard shell returned by |
124 | .IR getusershell (3). | |
125 | .IP 4) | |
917eb9fe KM |
126 | If the user name is ``anonymous'' or ``ftp'', an |
127 | anonymous ftp account must be present in the password | |
128 | file (user ``ftp''). In this case the user is allowed | |
129 | to log in by specifying any password (by convention this | |
130 | is given as the client host's name). | |
131 | .PP | |
132 | In the last case, | |
133 | .I ftpd | |
134 | takes special measures to restrict the client's access privileges. | |
135 | The server performs a | |
136 | .IR chroot (2) | |
137 | command to the home directory of the ``ftp'' user. | |
138 | In order that system security is not breached, it is recommended | |
139 | that the ``ftp'' subtree be constructed with care; the following | |
140 | rules are recommended. | |
141 | .IP ~ftp) | |
142 | Make the home directory owned by ``ftp'' and unwritable by anyone. | |
143 | .IP ~ftp/bin) | |
144 | Make this directory owned by the super-user and unwritable by | |
145 | anyone. The program | |
146 | .IR ls (1) | |
147 | must be present to support the list commands. This | |
148 | program should have mode 111. | |
149 | .IP ~ftp/etc) | |
150 | Make this directory owned by the super-user and unwritable by | |
151 | anyone. The files | |
152 | .IR passwd (5) | |
153 | and | |
154 | .IR group (5) | |
155 | must be present for the | |
156 | .I ls | |
157 | command to work properly. These files should be mode 444. | |
158 | .IP ~ftp/pub) | |
159 | Make this directory mode 777 and owned by ``ftp''. Users | |
160 | should then place files which are to be accessible via the | |
161 | anonymous account in this directory. | |
162 | .SH "SEE ALSO" | |
43c671de | 163 | ftp(1), getusershell(3), syslogd(8) |
917eb9fe | 164 | .SH BUGS |
917eb9fe KM |
165 | The anonymous account is inherently dangerous and should |
166 | avoided when possible. | |
167 | .PP | |
168 | The server must run as the super-user | |
169 | to create sockets with privileged port numbers. It maintains | |
170 | an effective user id of the logged in user, reverting to | |
171 | the super-user only when binding addresses to sockets. The | |
172 | possible security holes have been extensively | |
173 | scrutinized, but are possibly incomplete. |