Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ftpchroot(5) [osx man page]

FTPUSERS(5)						      BSD File Formats Manual						       FTPUSERS(5)

NAME
ftpusers, ftpchroot -- tnftpd(8) access control file DESCRIPTION
The ftpusers file provides user access control for tnftpd(8) by defining which users may login. If the ftpusers file does not exist, all users are denied access. A ``'' is the escape character; it can be used to escape the meaning of the comment character, or if it is the last character on a line, extends a configuration directive across multiple lines. A ``#'' is the comment character, and all characters from it to the end of line are ignored (unless it is escaped with the escape character). The syntax of each line is: userglob[:groupglob][@host] [directive [class]] These elements are: userglob matched against the user name, using fnmatch(3) glob matching (e.g, 'f*'). groupglob matched against all the groups that the user is a member of, using fnmatch(3) glob matching (e.g, '*src'). host either a CIDR address (refer to inet_net_pton(3)) to match against the remote address (e.g, '1.2.3.4/24'), or an fnmatch(3) glob to match against the remote hostname (e.g, '*.NetBSD.org'). directive If ``allow'' or ``yes'' the user is allowed access. If ``deny'' or ``no'', or directive is not given, the user is denied access. class defines the class to use in ftpd.conf(5). If class is not given, it defaults to one of the following: chroot If there is a match in /private/etc/ftpchroot for the user. guest If the user name is ``anonymous'' or 'ftp'. real If neither of the above is true. No further comparisons are attempted after the first successful match. If no match is found, the user is granted access. This syntax is backward-compatible with the old syntax. If a user requests a guest login, the tnftpd(8) server checks to see that both ``anonymous'' and ``ftp'' have access, so if you deny all users by default, you will need to add both ``anonymous allow'' and ``ftp allow'' to /private/etc/ftpusers in order to allow guest logins. /private/etc/ftpchroot The file /private/etc/ftpchroot is used to determine which users will have their session's root directory changed (using chroot(2)), either to the directory specified in the ftpd.conf(5) chroot directive (if set), or to the home directory of the user. If the file does not exist, the root directory change is not performed. The syntax is similar to ftpusers, except that the class argument is ignored. If there's a positive match, the session's root directory is changed. No further comparisons are attempted after the first successful match. This syntax is backward-compatible with the old syntax. FILES
/private/etc/ftpchroot List of normal users who should have their ftp session's root directory changed by using chroot(2). /private/etc/ftpusers This file. /usr/share/ftpd/examples/ftpusers A sample ftpusers file. SEE ALSO
fnmatch(3), inet_net_pton(3), ftpd.conf(5), tnftpd(8) BSD
February 28, 2003 BSD

Check Out this Related Man Page

FTPCHROOT(5)						      BSD File Formats Manual						      FTPCHROOT(5)

NAME
ftpchroot -- list users and groups subject to FTP access restrictions DESCRIPTION
The file ftpchroot is read by ftpd(8) at the beginning of an FTP session, after having authenticated the user. Each line in ftpchroot corre- sponds to a user or group. If a line in ftpchroot matches the current user or a group he is a member of, access restrictions will be applied to this session by changing its root directory with chroot(2) to that specified on the line or to the user's login directory. The order of records in ftpchroot is important because the first match will be used. Fields on each line are separated by tabs or spaces. The first field specifies a user or group name. If it is prefixed by an ``at'' sign, '@', it specifies a group name; the line will match each user who is a member of this group. As a special case, a single '@' in this field will match any user. A username is specified other- wise. The optional second field describes the directory for the user or each member of the group to be locked up in using chroot(2). Be it omit- ted, the user's login directory will be used. If it is not an absolute pathname, then it will be relative to the user's login directory. If it contains the /./ separator, ftpd(8) will treat its left-hand side as the name of the directory to do chroot(2) to, and its right-hand side to change the current directory to afterwards. FILES
/etc/ftpchroot EXAMPLES
These lines in ftpchroot will lock up the user ``webuser'' and each member of the group ``hostee'' in their respective login directories: webuser @hostee And this line will tell ftpd(8) to lock up the user ``joe'' in /var/spool/ftp and then to change the current directory to /joe, which is rel- ative to the session's new root: joe /var/spool/ftp/./joe And finally the following line will lock up every user connecting through FTP in his respective ~/public_html, thus lowering possible impact on the system from intrinsic insecurity of FTP: @ public_html SEE ALSO
chroot(2), group(5), passwd(5), ftpd(8) BSD
January 26, 2003 BSD
Man Page