1 .\" Copyright (c) 2003 FreeBSD Project
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 .\" $FreeBSD: src/libexec/ftpd/ftpchroot.5,v 1.3 2003/06/01 19:52:36 ru Exp $
26 .\" $DragonFly: src/libexec/ftpd/ftpchroot.5,v 1.4 2007/05/17 08:19:01 swildner Exp $
33 .Nd "list users and groups subject to FTP access restrictions"
39 at the beginning of an FTP session, after having authenticated the user.
42 corresponds to a user or group.
45 matches the current user or a group he is a member of,
46 access restrictions will be applied to this
47 session by changing its root directory with
49 to that specified on the line or to the user's login directory.
51 The order of records in
53 is important because the first match will be used.
54 Fields on each line are separated by tabs or spaces.
56 The first field specifies a user or group name.
57 If it is prefixed by an
61 it specifies a group name;
62 the line will match each user who is a member of this group.
63 As a special case, a single
65 in this field will match any user.
66 A username is specified otherwise.
68 The optional second field describes the directory for the user
69 or each member of the group to be locked up in using
71 Be it omitted, the user's login directory will be used.
72 If it is not an absolute pathname, then it will be relative
73 to the user's login directory.
78 will treat its left-hand side as the name of the directory to do
80 to, and its right-hand side to change the current directory to afterwards.
82 .Bl -tag -width ".Pa /etc/ftpchroot" -compact
90 and each member of the group
92 in their respective login directories:
93 .Bd -literal -offset indent
98 And this line will tell
104 and then to change the current directory to
106 which is relative to the session's new root:
108 .Dl "joe /var/spool/ftp/./joe"
110 And finally the following line will lock up every user connecting
111 through FTP in his respective
113 thus lowering possible impact on the system
114 from intrinsic insecurity of FTP: