File: ftpd.8

package info (click to toggle)
publicfile 0.52-14
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 900 kB
  • sloc: ansic: 3,903; makefile: 472; sh: 296
file content (86 lines) | stat: -rw-r--r-- 2,687 bytes parent folder | download
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
.\" this file maintained using git at
.\" git@salsa.debian.org:debian/publicfile.git
.\"
.\" No copyright is claimed.  This code is in the public domain; do with
.\" it what you wish. Written by Joost van Baal-Ilić, 2021.
.\"
.de URL
\\$2 \(laURL: \\$1 \(ra\\$3
..
.if \n[.g] .mso www.tmac
.TH ftpd 8 2021-10-10 "publicfile 0.52-12"
.SH NAME


D. J. Bernstein
Internet publication
publicfile

The ftpd program

ftpd handles an FTP connection.

Interface

     ftpd root

ftpd prints requested public files from the root directory hierarchy. Normally
root is /public/file.

ftpd accepts PWD, CWD, CDUP, TYPE, PORT, PASV, SPSV, REST, RETR, LIST, NLST,
and QUIT requests on standard input in FTP format. It prints responses on
standard output, and local log information on standard error.

ftpd recognizes USER, PASS, and ACCT, but it does not check usernames or
passwords. It has minimal support for STRU, MODE, SYST, HELP, and NOOP.

ftpd exits silently if it runs out of memory, encounters an I/O error, or does
not receive an input packet within 60 seconds.

Normally ftpd is run under tcpserver to handle FTP connections from hosts
around the Internet. Note that ftpd does not print the standard FTP greeting
message; the greeting message is handled by tcpserver.

File handling

A request for a file or directory named f refers to ./0/f inside the root
directory hierarchy.

ftpd has built-in support for NLST and LIST; it does not run an external root/
bin/ls. It provides EPLF LIST responses, including EPLF options "i", "s", and
"m".

Security

ftpd chroots to root when it starts. It then sets its group id and user id to
the numbers given in environment variables $GID and $UID, as set by envuidgid.

ftpd does not allow dots immediately after slashes in file names. It converts
any such dots to colons before attempting to open the file.

ftpd will refuse to read a file if the file



  • is unreadable to user;
  • is unreadable to group;
  • is unreadable to world;
  • is world-executable without being user-executable; or
  • is anything but a regular file or directory: a socket, device, etc.

In directory listings, ftpd will skip a file if the name begins with a dot. It
will also skip names that contain tildes, spaces, or control characters; note,
however, that these files can still be accessed by someone who knows or guesses
the name.

ftpd uses local ports above 1024 for PORT connections, rather than the standard
port 20. It rejects remote ports below 1024, and it rejects third-party PORT.
It also rejects third-party PASV.

Unsupported features

ftpd does not support file modification requests such as STOR.


http://cr.yp.to/publicfile/ftpd.html