Do not use .Xo/.Xc to work around ancient roff limits.
[netbsd-mini2440.git] / libexec / ftpd / ftpusers.5
blobd28cbf258287a99f1486b3f1e66ba2aa749ed6f2
1 .\"     $NetBSD: ftpusers.5,v 1.16 2008/04/30 13:10:52 martin Exp $
2 .\"
3 .\" Copyright (c) 1997-2008 The NetBSD Foundation, Inc.
4 .\" All rights reserved.
5 .\"
6 .\" This code is derived from software contributed to The NetBSD Foundation
7 .\" by Luke Mewburn.
8 .\"
9 .\" Redistribution and use in source and binary forms, with or without
10 .\" modification, are permitted provided that the following conditions
11 .\" are met:
12 .\" 1. Redistributions of source code must retain the above copyright
13 .\"    notice, this list of conditions and the following disclaimer.
14 .\" 2. Redistributions in binary form must reproduce the above copyright
15 .\"    notice, this list of conditions and the following disclaimer in the
16 .\"    documentation and/or other materials provided with the distribution.
17 .\"
18 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21 .\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 .\" POSSIBILITY OF SUCH DAMAGE.
29 .\"
30 .Dd July 17, 2000
31 .Dt FTPUSERS 5
32 .Os
33 .Sh NAME
34 .Nm ftpusers ,
35 .Nm ftpchroot
36 .Nd
37 .Xr ftpd 8
38 access control file
39 .Sh DESCRIPTION
40 The
41 .Nm
42 file provides user access control for
43 .Xr ftpd 8
44 by defining which users may login.
45 .Pp
46 If the
47 .Nm
48 file does not exist, all users are denied access.
49 .Pp
51 .Dq \e
52 is the escape character; it can be used to escape the meaning of the
53 comment character, or if it is the last character on a line, extends
54 a configuration directive across multiple lines.
56 .Dq #
57 is the comment character, and all characters from it to the end of
58 line are ignored (unless it is escaped with the escape character).
59 .Pp
60 The syntax of each line is:
61 .Dl userglob[:groupglob][@host] [directive [class]]
62 .Pp
63 These elements are:
64 .Bl -tag -width "groupglob" -offset indent
65 .It Sy userglob
66 matched against the user name, using
67 .Xr fnmatch 3
68 glob matching
69 (e.g,
70 .Sq f* ) .
71 .It Sy groupglob
72 matched against all the groups that the user is a member of, using
73 .Xr fnmatch 3
74 glob matching
75 (e.g,
76 .Sq *src ) .
77 .It Sy host
78 either a CIDR address (refer to
79 .Xr inet_net_pton 3 )
80 to match against the remote address
81 (e.g,
82 .Sq 1.2.3.4/24 ) ,
83 or an
84 .Xr fnmatch 3
85 glob to match against the remote hostname
86 (e.g,
87 .Sq *.NetBSD.org ) .
88 .It Sy directive
90 .Dq allow
92 .Dq yes
93 the user is allowed access.
95 .Dq deny
97 .Dq no ,
99 .Sy directive
100 is not given, the user is denied access.
101 .It Sy class
102 defines the class to use in
103 .Xr ftpd.conf 5 .
107 .Sy class
108 is not given, it defaults to one of the following:
109 .Bl -tag -width "chroot" -offset indent
110 .It Sy chroot
111 If there is a match in
112 .Sx /etc/ftpchroot
113 for the user.
114 .It Sy guest
115 If the user name is
116 .Dq anonymous
118 .Sq ftp .
119 .It Sy real
120 If neither of the above is true.
123 No further comparisons are attempted after the first successful match.
124 If no match is found, the user is granted access.
125 This syntax is backward-compatible with the old syntax.
127 If a user requests a guest login, the
128 .Xr ftpd 8
129 server checks to see that
130 both
131 .Dq anonymous
133 .Dq ftp
134 have access, so if you deny all users by default, you will need to add both
135 .Dq "anonymous allow"
137 .Dq "ftp allow"
139 .Pa /etc/ftpusers
140 in order to allow guest logins.
141 .Ss /etc/ftpchroot
142 The file
143 .Pa /etc/ftpchroot
144 is used to determine which users will have their session's root directory
145 changed (using
146 .Xr chroot 2 ) ,
147 either to the directory specified in the
148 .Xr ftpd.conf 5
149 .Sy chroot
150 directive (if set),
151 or to the home directory of the user.
152 If the file does not exist, the root directory change is not performed.
154 The syntax is similar to
155 .Nm ,
156 except that the
157 .Sy class
158 argument is ignored.
159 If there's a positive match, the session's root directory is changed.
160 No further comparisons are attempted after the first successful match.
161 This syntax is backward-compatible with the old syntax.
162 .Sh FILES
163 .Bl -tag -width /usr/share/examples/ftpd/ftpusers -compact
164 .It Pa /etc/ftpchroot
165 List of normal users who should have their ftp session's root directory
166 changed by using
167 .Xr chroot 2 .
168 .It Pa /etc/ftpusers
169 This file.
170 .It Pa /usr/share/examples/ftpd/ftpusers
171 A sample
173 file.
175 .Sh SEE ALSO
176 .Xr fnmatch 3 ,
177 .Xr inet_net_pton 3 ,
178 .Xr ftpd.conf 5 ,
179 .Xr ftpd 8