man ftpusers (Formats) - ftpusers ,
NAME
access control file
DESCRIPTION
The file provides user access control for ftpd() by defining which users may login.
If the 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:
These elements are:
- Sy userglob
- matched against the user name, using fnmatch() glob matching (e.g,
- Sy groupglob
- matched against all the groups that the user is a member of, using fnmatch() glob matching (e.g,
- Sy host
- either a CIDR address (refer to inet_net_pton(3) ) to match against the remote address (e.g, or a glob to match against the remote hostname (e.g,
- Sy directive
- If or the user is allowed access. If or or is not given, the user is denied access.
- Sy class
- defines the class to use in ftpd.conf(5) .
If is not given, it defaults to one of the following:
- Sy chroot
- If there is a match in for the user.
- Sy guest
- If the user name is or
- Sy 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-compatable with the old syntax.
If a user requests a guest login, the ftpd() server checks to see that both and have access, so if you deny all users by default, you will need to add both and to /etc/ftpusers in order to allow guest logins.
/etc/ftpchroot
The file /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() 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 , except that the 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-compatable with the old syntax.