freeBSD ftpd配置介紹
像自帶sendmail一樣,freeBSD在系統安裝時自帶了ftp,這就是freeBSD的ftpd進程,默認以inetd方式運行,你只要在/etc/inetd.conf里如下設置:
ftp stream tcp nowait root /usr/libexec/ftpd ftpd -l
ftp stream tcp6 nowait root /usr/libexec/ftpd ftpd -l
并在/etc/rc.conf里設置:
inetd_enable="YES"
這樣ftpd就能順暢運行。
但是如果你的ftp運行很繁忙,用inetd方式運行ftp勢必影響效率和性能,此時建議你以獨立方式運行freeBSD的ftpd,方法很簡單,如下:
在/etc/inetd.conf里注釋掉以上兩句,用如下方式啟動:
#/usr/libexec/ftpd -D
ftpd的參數比較多常用的如下:
-A: 只允許匿名登錄;
-M: 不允許匿名創建目錄;
-m: 賦予匿名修改,覆蓋等權限;
更多參數請man ftpd.
ftpd的相關設置文件:
/etc/ftpusers List of unwelcome/restricted users.
/etc/ftpchroot List of normal users who should be chroot'd.
/etc/ftphosts Virtual hosting configuration file.
/etc/ftpwelcome Welcome notice.
/etc/ftpmotd Welcome notice after login.
/var/run/nologin Displayed and access refused.
/var/log/ftpd Log file for anonymous transfers.
/var/log/xferlog Default place for session logs.
回復 更多評論