无法使用 Pure-FTPd 登录

无法使用 Pure-FTPd 登录

我已经使用 brew 在我的 MacOS Catalina 上安装了 Pure-FTPd,并使用 启动它brew services start pure-ftpd。配置将/usr/local/etc/pure-ftpd.confNoAnonymous 设置为 no,将 MinUID 设置为 100。我创建了一个基于系统帐户的虚拟用户,nobodyUID 为 4294967294。我还将其添加/usr/bin/false/etc/shells。但是,我仍然收到以下错误:

421 Sorry, but I can't trust you
ftp: Login failed.

在尝试修改配置并创建稍作修改的虚拟用户几次后,我尝试以匿名身份登录 FTP。但是,我收到以下错误:

Unable to set up secure anonymous FTP

我查看了 Pure-FTPd 的常见问题解答,似乎已经解决了上述两个错误的所有潜在原因。关于如何登录 FTP,有什么建议吗?

答案1

我按照以下帖子中的步骤进行操作 pure-ftpd 连接拒绝高山上的本地主机

  1. 我已经停止该服务(还检查活动监视器以确保没有其他pureftpd正在运行的实例)。
$ brew services stop pure-ftpd

  1. 我已经删除服务
$ brew remove pure-ftpd
  1. 我已经更新了 brew
$ brew upgrade
  1. 我已经清理了
$ brew cleanup
  1. 我已经重新安装了
$ brew install pure-ftpd
  1. /etc/pam.d/pure-ftpd我使用 root 权限创建了以下几行:
# pure-ftpd: auth account password session
auth       required       pam_opendirectory.so
account    required       pam_permit.so
password   required       pam_deny.so
session    required       pam_permit.so
  1. 设置 pam 配置
sudo /usr/local/sbin/pure-ftpd -lpam -B
  1. 我已经重启服务
$ brew services restart pure-ftpd
  1. 最后连接成功了!
$ ftp localhost
Trying ::1...
Connected to localhost.
220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
220-You are user number 1 of 50 allowed.
220-Local time is now 20:42. Server port: 21.
220 You will be disconnected after 15 minutes of inactivity.
Name (localhost:alexandre1202): 
331 User alexandre1202 OK. Password required
Password: 
230 OK. Current directory is /Users/alexandre1202
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>

相关内容