18657b576SYaroslav Tykhiy.\" Copyright (c) 2003 FreeBSD Project 28657b576SYaroslav Tykhiy.\" All rights reserved. 38657b576SYaroslav Tykhiy.\" 48657b576SYaroslav Tykhiy.\" Redistribution and use in source and binary forms, with or without 58657b576SYaroslav Tykhiy.\" modification, are permitted provided that the following conditions 68657b576SYaroslav Tykhiy.\" are met: 78657b576SYaroslav Tykhiy.\" 1. Redistributions of source code must retain the above copyright 88657b576SYaroslav Tykhiy.\" notice, this list of conditions and the following disclaimer. 98657b576SYaroslav Tykhiy.\" 2. Redistributions in binary form must reproduce the above copyright 108657b576SYaroslav Tykhiy.\" notice, this list of conditions and the following disclaimer in the 118657b576SYaroslav Tykhiy.\" documentation and/or other materials provided with the distribution. 128657b576SYaroslav Tykhiy.\" 138657b576SYaroslav Tykhiy.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 148657b576SYaroslav Tykhiy.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 158657b576SYaroslav Tykhiy.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 168657b576SYaroslav Tykhiy.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 178657b576SYaroslav Tykhiy.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 188657b576SYaroslav Tykhiy.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 198657b576SYaroslav Tykhiy.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 208657b576SYaroslav Tykhiy.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 218657b576SYaroslav Tykhiy.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 228657b576SYaroslav Tykhiy.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 238657b576SYaroslav Tykhiy.\" SUCH DAMAGE. 248657b576SYaroslav Tykhiy.\" 258657b576SYaroslav Tykhiy.\" $FreeBSD$ 268657b576SYaroslav Tykhiy.\" 278657b576SYaroslav Tykhiy.Dd January 26, 2003 288657b576SYaroslav Tykhiy.Dt FTPCHROOT 5 298657b576SYaroslav Tykhiy.Os 308657b576SYaroslav Tykhiy.Sh NAME 318657b576SYaroslav Tykhiy.Nm ftpchroot 328657b576SYaroslav Tykhiy.Nd list users and groups subject to FTP access restrictions 338657b576SYaroslav Tykhiy.Sh DESCRIPTION 348657b576SYaroslav TykhiyThe file 358657b576SYaroslav Tykhiy.Nm 368657b576SYaroslav Tykhiyis read by 378657b576SYaroslav Tykhiy.Xr ftpd 8 388657b576SYaroslav Tykhiyat the beginning of an FTP session, after having authenticated the user. 398657b576SYaroslav TykhiyEach line in 408657b576SYaroslav Tykhiy.Nm 418657b576SYaroslav Tykhiycorresponds to a user or group. If a line in 428657b576SYaroslav Tykhiy.Nm 438657b576SYaroslav Tykhiymatches the current user or a group he is a member of, 448657b576SYaroslav Tykhiyaccess restrictions will be applied to this 458657b576SYaroslav Tykhiysession by changing its root directory with 468657b576SYaroslav Tykhiy.Xr chroot 2 478657b576SYaroslav Tykhiyto that specified on the line or to the user's login directory. 488657b576SYaroslav Tykhiy.Pp 498657b576SYaroslav TykhiyThe order of records in 508657b576SYaroslav Tykhiy.Nm 518657b576SYaroslav Tykhiyis important because the first match will be used. 528657b576SYaroslav TykhiyFields on each line are separated by tabs or spaces. 538657b576SYaroslav Tykhiy.Pp 548657b576SYaroslav TykhiyThe first field specifies a user or group name. 558657b576SYaroslav TykhiyIf it is prefixed by an 568657b576SYaroslav Tykhiy.Qq at 578657b576SYaroslav Tykhiysign, 588657b576SYaroslav Tykhiy.Ql \&@ , 598657b576SYaroslav Tykhiyit specifies a group name; 608657b576SYaroslav Tykhiythe line will match each user who is a member of this group. 618657b576SYaroslav TykhiyAs a special case, a single 628657b576SYaroslav Tykhiy.Ql \&@ 638657b576SYaroslav Tykhiyin this field will match any user. 648657b576SYaroslav TykhiyA username is specified otherwise. 658657b576SYaroslav Tykhiy.Pp 668657b576SYaroslav TykhiyThe optional second field describes the directory for the user 678657b576SYaroslav Tykhiyor each member of the group to be locked up in using 688657b576SYaroslav Tykhiy.Xr chroot 2 . 698657b576SYaroslav TykhiyIf it is not an absolute pathname, then it will be relative 708657b576SYaroslav Tykhiyto the user's login directory. 718657b576SYaroslav TykhiyBe this field omitted, the user's login directory will be used. 728657b576SYaroslav Tykhiy.Sh FILES 738657b576SYaroslav Tykhiy.Bl -tag -width /etc/ftpchroot -compact 748657b576SYaroslav Tykhiy.It Pa /etc/ftpchroot 758657b576SYaroslav Tykhiy.El 768657b576SYaroslav Tykhiy.Sh EXAMPLES 778657b576SYaroslav TykhiyThese lines in 788657b576SYaroslav Tykhiy.Nm 798657b576SYaroslav Tykhiywill lock up the user 808657b576SYaroslav Tykhiy.Qq webuser 818657b576SYaroslav Tykhiyand each member of the group 828657b576SYaroslav Tykhiy.Qq hostee 838657b576SYaroslav Tykhiyin their respective login directories: 848657b576SYaroslav Tykhiy.Bd -literal -offset indent 858657b576SYaroslav Tykhiywebuser 868657b576SYaroslav Tykhiy@hostee 878657b576SYaroslav Tykhiy.Ed 888657b576SYaroslav Tykhiy.Pp 898657b576SYaroslav TykhiyAnd this line will lock up the user 908657b576SYaroslav Tykhiy.Qq joe 918657b576SYaroslav Tykhiyin 928657b576SYaroslav Tykhiy.Pa /var/spool/ftp : 938657b576SYaroslav Tykhiy.Bd -literal -offset indent 948657b576SYaroslav Tykhiyjoe /var/spool/ftp 958657b576SYaroslav Tykhiy.Ed 968657b576SYaroslav Tykhiy.Pp 978657b576SYaroslav TykhiyAnd finally the following line will lock up every user connecting 988657b576SYaroslav Tykhiythrough FTP in his respective 998657b576SYaroslav Tykhiy.Pa \&~/public_html , 1008657b576SYaroslav Tykhiythus lowering possible impact on the system 1018657b576SYaroslav Tykhiyfrom intrinsic insecurity of FTP: 1028657b576SYaroslav Tykhiy.Bd -literal -offset indent 1038657b576SYaroslav Tykhiy@ public_html 1048657b576SYaroslav Tykhiy.Ed 1058657b576SYaroslav Tykhiy.Sh SEE ALSO 1068657b576SYaroslav Tykhiy.Xr chroot 2 , 1078657b576SYaroslav Tykhiy.Xr group 5 , 1088657b576SYaroslav Tykhiy.Xr passwd 5 , 1098657b576SYaroslav Tykhiy.Xr ftpd 8 . 110