我已经在我的 CentOS 6.4 服务器上安装了Pure-ftpd
,配置完服务器后我运行了它/etc/init.d/pure-ftpd start ; /etc/init.d/xinetd restart
,它表明服务已成功启动。但是当我尝试在端口 21 中连接到服务器时,我收到以下错误:ftp: connect: Connection refused
,运行时netstat
它显示该端口未打开。我的/etc/pure-ftpd.conf
样子是这样的:
AllowAnonymousFXP no
AllowUserFXP no
AltLog clf:/var/log/pureftpd.log
AnonymousCanCreateDirs no
AnonymousCantUpload yes
AnonymousOnly no
AntiWarez yes
AutoRename no
BrokenClientsCompatibility yes
CallUploadScript yes
ChrootEveryone yes
CustomerProof yes
Daemonize yes
DisplayDotFiles yes
DontResolve yes
LimitRecursion 7500 8
MaxClientsNumber 50
MaxClientsPerIP 8
MaxDiskUsage 99
MaxIdleTime 180
MaxLoad 4
MinUID 500
NoAnonymous yes
PAMAuthentication yes
ProhibitDotFilesRead no
ProhibitDotFilesWrite no
PureDB /etc/pure-ftpd/pureftpd.pdb
SyslogFacility ftp
Umask 133:022
UseFtpUsers no
VerboseLog yes
/etc/xinetd.d/pure-ftpd
:
service ftp
{
disable = yes
socket_type = stream
wait = no
user = root
server = /usr/sbin/pure-config.pl
server_args = /etc/pure-ftpd/pure-ftpd.conf
log_on_success += DURATION USERID
log_on_failure += USERID
nice = 10
}
/etc/pam.d/pure-ftpd
看起来像这样: [root@amaftp ~]# cat /etc/pam.d/pure-ftpd
#%PAM-1.0
# Sample PAM configuration file for Pure-FTPd.
# Install it in /etc/pam.d/pure-ftpd or add to /etc/pam.conf
auth required pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed
auth include system-auth
auth required pam_shells.so
auth required pam_nologin.so
account include system-auth
password include system-auth
session include system-auth
[root@amaftp ~]# 我没有使用pure-ftp-ldap/mysql/pgsql
。如果我运行,/usr/sbin/pure-ftpd
端口将成功打开,并且我能够连接,但我希望它作为守护进程运行,并且我想xinetd
管理它。没有任何内容写入日志,甚至没有在日志中创建日志文件/var/log
此外,我在另一台服务器上有完全相同的配置,它在那里运行良好,失败的原因可能是什么?谢谢