Main index | Section 5 | 日本語 | Options |
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 otherwise.
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 omitted, 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.
/etc/ftpchroot | |
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 relative 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
FTPCHROOT (5) | January 26, 2003 |
Main index | Section 5 | 日本語 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
“ | Never write it in C if you can do it in `awk'; Never do it in `awk' if `sed' can handle it; Never use `sed' when `tr' can do the job; Never invoke `tr' when `cat' is sufficient; Avoid using `cat' whenever possible. |
” |
— Taylor's Laws of Programming |