这几天用了lnmp中集成的pure-ftp,直接用脚本安装,比手工配置pure-ftp方便多了,说来pure-ftp网上手工配置的教程真是看的头疼,都是复制来复制去,一团乱麻。

问题1:http://域名/ftp 打开空白

把ftp程序目录赋予777最高权限,比如lnmp环境默认在/home/wwwroot/default/ftp

问题2:登陆报错:530 Login authentication failed

成功进入web管理页面后,配置好账号,然后用ftp软件登陆的时候会报错:530 Login authentication failed

[09:16:50] [R] 220———- Welcome to Pure-FTPd [privsep] ———-
[09:16:50] [R] 220-You are user number 1 of 50 allowed.
[09:16:50] [R] 220-Local time is now 09:16. Server port: 21.
[09:16:50] [R] 220-This is a private system – No anonymous login
[09:16:50] [R] 220-IPv6 connections are also welcome on this server.
[09:16:50] [R] 220 You will be disconnected after 15 minutes of inactivity.
[09:16:50] [R] USER rongxin
[09:16:50] [R] 331 User rongxin OK. Password required
[09:16:50] [R] PASS (hidden)
[09:17:02] [R] 530 Login authentication failed
[09:17:02] [R] 连接失败 (Connection closed by server)
[09:17:02] [R] 尝试重新连接 #10 次后延迟 1 秒
[09:17:12] [R] 正在尝试重新连接.
[09:17:12] [R] 正在连接到 59.46.*.104 -> IP=59.46.*.104 PORT=21 (次尝试 # 1)

 

 

 

查看下日志:/var/log/messages:

pure-ftp

 

其中核心报错为:“account disabled”账户被禁用,

查看pureftpd.conf的配置,其中:

# Minimum UID for an authenticated user to log in.

MinUID 500

pure-ftpd配置中只允许uid大于等于500的,才可以登录ftp(系统安全考虑)

我们可以修改配置,把uid阈值调小,也可以在pure-ftp网页管理中设置一个uid大于500的用户。

以上,完美解决