0

I really need your help.

I tried to run ftp server on my Macbook OS High Sierra (Version 10.14.16)

But I couldn't. My steps are:

Setup ftp server on local by running pure-ftpd:

brew install pure-ftpd
brew services start pure-ftpd
sudo /usr/local/sbin/pure-ftpd

Setup fpt client to connect to fpt server on local:

brew install tnftp

Config pure-ftpd like this link: https://wiki.archlinux.org/index.php/Pure-FTPd (Update file /usr/local/etc/pure-ftpd.conf) contains:

Uncomment the following two lines:

NoAnonymous yes
PureDB /usr/local/etc/pureftpd.pdb

set the option MinUID in /usr/local/etc/pure-ftpd.conf to 98 (I got it when run: sudo pure-pw show username) [UID : 98 (_ftp)]

List the shell of the FTP system user in /etc/shells: echo "/bin/false" >> /etc/shells (I appended '/bin/false' to end of this file manually) Make users (virtual or real user on my mac still not work):

mkdir ~/ftpuser/test3
sudo pure-pw useradd test3 -u ftp -D /Users/macbook/ftpuser/test3
sudo pure-pw mkdb

But when I tried to connect ftp server, the result is like this:

Macbooks-MacBook-Pro:marketing macbook$ 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 23:06. Server port: 21.
220 You will be disconnected after 15 minutes of inactivity.
Name (localhost:macbook): test3
331 User test3 OK. Password required
Password:
530 Login authentication failed
ftp: Login failed
ftp> quit
221-Goodbye. You uploaded 0 and downloaded 0 kbytes.
221 Logout.
user3025456
  • 1
  • 1
  • 1

1 Answers1

0

brew install pure-ftpd

brew install inetutils

sudo brew services start pure-ftpd

su root

Edit:

vi /usr/local/etc/pure-ftpd.conf

Change:

NoAnonymous no

To:

NoAnonymous yes

And uncomment:

PureDB /usr/local/etc/pureftpd.pdb

Save and exit.

I have created the /etc/pam.d/pure-ftpd following lines using root privilege:

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

Save and exit, and exit root user.

mkdir /Users/you-username/ftpshare

chmod 777 /Users/you-username/ftpshare

Create user and password to access ftp directory:

sudo pure-pw useradd userftp -u ftp -D /Users/you-username/ftpshare

Make db: sudo pure-pw mkdb

sudo brew services restart pure-ftpd

check:

ftp 127.0.0.1

Good luck

gidalo.it

Gidalo
  • 1
  • 1
  • Please note the conventions for formatting [How do I format my posts using Markdown or HTML](http://superuser.com/help/formatting). – help-info.de Jan 09 '21 at 10:06