Pure-FTPd

Why reinvent the wheel?


To add users:

pure-pw useradd somebody -u ftpuser -d /var/ftp/public/
pure-pw mkdb

To require TLS

echo 2 > TLS

For a NAT'd system, make sure to force the external address 

echo ftp.myhost.com > ForcePassiveIP
 

To make sure fail2ban can block hosts that don't have reverse records (Unable to find a corresponding IP address for 17.193.178.61.dail.pl.gs.dynamic.163data.com.cn)

echo "yes" > /etc/pure-ftpd/conf/DontResolve

Also - don't forget to add the number of days for expiration in the cert generation

openssl req -x509 -nodes -newkey rsa:1024 -keyout /etc/ssl/private/pure-ftpd.pem -out /etc/ssl/private/pure-ftpd.pem -days 9999

For logging, change the ...


Did you configure the firewall? -> FTP Behind a Firewall

Did you enable an upload folder?

Assuming you have a user named ftpuser and a group named ftpgroup (these are created by the ubuntu apt install process)  you need to;
- know where your virtual user's chroot is
- cd to it and create an 'Uploads' folder
- add group write ability to it
- change it's group owner ship to the ftpgroup (now the ftp user can write files there)
- add yourself to that group so you can write files there

cd /some/place/
sudo mkdir Uploads
sudo chmod g+w Uploads/
sudo chgrp ftpgroup Uploads/
sudo usermod -a -G ftpgroup someUser
groups ftpuser


Comments