FreeBSD에서는 내장된 FTPD를 가지고 서비스를 해줄수 있습니다.
바이너리 위치는 /usr/libexec/ftpd에 있으며 실행 스크립트는 /etc/rc.d/ftpd에 있습니다.inet 방식으로 운영하시려면 /etc/inetd.conf를 수정하여 사용하면 됩니다.
아래 보이는 ftp 부분을 주석 해제 해주시면 됩니다. (IPv6 사용자는 tcp6을 해제 해주세요.)
[root@yongbok ~]# ee /etc/inetd.conf
# $FreeBSD: src/etc/inetd.conf,v 1.73.10.2.6.1 2010/12/21 17:09:25 kensmith Exp $
#
# Internet server configuration database
#
# Define *both* IPv4 and IPv6 entries for dual-stack support.
# To disable a service, comment it out by prefixing the line with ‘#’.
# To enable a service, remove the ‘#’ at the beginning of the line.
#
ftp stream tcp nowait root /usr/libexec/ftpd ftpd -l
ftp stream tcp6 nowait root /usr/libexec/ftpd ftpd -l
#ssh stream tcp nowait root /usr/sbin/sshd sshd -i -4
#ssh stream tcp6 nowait root /usr/sbin/sshd sshd -i -6
#telnet stream tcp nowait root /usr/libexec/telnetd telnetd
#telnet stream tcp6 nowait root /usr/libexec/telnetd telnetd
#shell stream tcp nowait root /usr/libexec/rshd rshd
#shell stream tcp6 nowait root /usr/libexec/rshd rshd
#login stream tcp nowait root /usr/libexec/rlogind rlogind
#login stream tcp6 nowait root /usr/libexec/rlogind rlogind
#finger stream tcp nowait/3/10 nobody /usr/libexec/fingerd fingerd -s
#finger stream tcp6 nowait/3/10 nobody /usr/libexec/fingerd fingerd -s
inetd를 /etc/rc.conf에 등록후 시작 해줍니다.
[root@yongbok ~]# echo ‘inetd_enable=”YES”‘ >> /etc/rc.conf
[root@yongbok ~]# /etc/rc.d/inetd start
Starting inetd.
standalone 방식으로 운영하시려면 아래와 같이 -D 옵션을 사용하여 데몬으로 구동 하면 됩니다.
(-4는 IPv4 사용 옵션이고 -6이면 IPv6을 사용합니다. 더 많은 옵션은 man ftpd 를 입력하셔서 참고하세요.)
[root@yongbok ~]# /usr/libexec/ftpd -D -4