]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/lukemftpd/src/ftpusers.5
This commit was generated by cvs2svn to compensate for changes in r133665,
[FreeBSD/FreeBSD.git] / contrib / lukemftpd / src / ftpusers.5
1 .\"     $NetBSD: ftpusers.5,v 1.13 2001/12/01 16:24:24 wiz Exp $
2 .\"
3 .\" Copyright (c) 1997-2001 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 .\" 3. All advertising materials mentioning features or use of this software
18 .\"    must display the following acknowledgement:
19 .\"        This product includes software developed by the NetBSD
20 .\"        Foundation, Inc. and its contributors.
21 .\" 4. Neither the name of The NetBSD Foundation nor the names of its
22 .\"    contributors may be used to endorse or promote products derived
23 .\"    from this software without specific prior written permission.
24 .\"
25 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
26 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
27 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28 .\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
29 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35 .\" POSSIBILITY OF SUCH DAMAGE.
36 .\"
37 .\"     $FreeBSD$
38 .\"
39 .\"
40 .Dd July 17, 2000
41 .Dt FTPUSERS 5
42 .Os
43 .Sh NAME
44 .Nm ftpusers ,
45 .Nm ftpchroot
46 .Nd
47 .Xr ftpd 8
48 access control file
49 .Sh DESCRIPTION
50 The
51 .Nm
52 file provides user access control for
53 .Xr ftpd 8
54 by defining which users may login.
55 .Pp
56 If the
57 .Nm
58 file does not exist, all users are denied access.
59 .Pp
60 A
61 .Dq \e
62 is the escape character; it can be used to escape the meaning of the
63 comment character, or if it is the last character on a line, extends
64 a configuration directive across multiple lines.
65 A
66 .Dq #
67 is the comment character, and all characters from it to the end of
68 line are ignored (unless it is escaped with the escape character).
69 .Pp
70 The syntax of each line is:
71 .Dl userglob[:groupglob][@host] [directive [class]]
72 .Pp
73 These elements are:
74 .Bl -tag -width "groupglob" -offset indent
75 .It Sy userglob
76 matched against the user name, using
77 .Xr fnmatch 3
78 glob matching
79 (e.g,
80 .Sq f* ) .
81 .It Sy groupglob
82 matched against all the groups that the user is a member of, using
83 .Xr fnmatch 3
84 glob matching
85 (e.g,
86 .Sq *src ) .
87 .It Sy host
88 either a CIDR address (refer to
89 .Xr inet_net_pton 3 )
90 to match against the remote address
91 (e.g,
92 .Sq 1.2.3.4/24 ) ,
93 or an
94 .Xr fnmatch 3
95 glob to match against the remote hostname
96 (e.g,
97 .Sq *.netbsd.org ) .
98 .It Sy directive
99 If
100 .Dq allow
101 or
102 .Dq yes
103 the user is allowed access.
104 If
105 .Dq deny
106 or
107 .Dq no ,
108 or
109 .Sy directive
110 is not given, the user is denied access.
111 .It Sy class
112 defines the class to use in
113 .Xr ftpd.conf 5 .
114 .El
115 .Pp
116 If
117 .Sy class
118 is not given, it defaults to one of the following:
119 .Bl -tag -width "chroot" -offset indent
120 .It Sy chroot
121 If there is a match in
122 .Sx /etc/ftpchroot
123 for the user.
124 .It Sy guest
125 If the user name is
126 .Dq anonymous
127 or
128 .Sq ftp .
129 .It Sy real
130 If neither of the above is true.
131 .El
132 .Pp
133 No further comparisons are attempted after the first successful match.
134 If no match is found, the user is granted access.
135 This syntax is backward-compatible with the old syntax.
136 .Pp
137 If a user requests a guest login, the
138 .Xr ftpd 8
139 server checks to see that
140 both
141 .Dq anonymous
142 and
143 .Dq ftp
144 have access, so if you deny all users by default, you will need to add both
145 .Dq "anonymous allow"
146 and
147 .Dq "ftp allow"
148 to
149 .Pa /etc/ftpusers
150 in order to allow guest logins.
151 .Ss /etc/ftpchroot
152 The file
153 .Pa /etc/ftpchroot
154 is used to determine which users will have their session's root directory
155 changed (using
156 .Xr chroot 2 ) ,
157 either to the directory specified in the
158 .Xr ftpd.conf 5
159 .Sy chroot
160 directive (if set),
161 or to the home directory of the user.
162 If the file does not exist, the root directory change is not performed.
163 .Pp
164 The syntax is similar to
165 .Nm ,
166 except that the
167 .Sy class
168 argument is ignored.
169 If there's a positive match, the session's root directory is changed.
170 No further comparisons are attempted after the first successful match.
171 This syntax is backward-compatible with the old syntax.
172 .Sh FILES
173 .Bl -tag -width /usr/share/examples/ftpd/ftpusers -compact
174 .It Pa /etc/ftpchroot
175 List of normal users who should have their ftp session's root directory
176 changed by using
177 .Xr chroot 2 .
178 .It Pa /etc/ftpusers
179 This file.
180 .It Pa /usr/share/examples/ftpd/ftpusers
181 A sample
182 .Nm
183 file.
184 .El
185 .Sh SEE ALSO
186 .Xr fnmatch 3 ,
187 .Xr inet_net_pton 3 ,
188 .Xr ftpd.conf 5 ,
189 .Xr ftpd 8