ftp server

apt install pure-ftpd
groupadd ftpgroup
useradd ftpuser -g ftpgroup -s /sbin/nologin -d /dev/null
ln -s /etc/pure-ftpd/conf/PureDB /etc/pure-ftpd/auth/60puredb
pure-pw useradd hass -u ftpuser -g ftpgroup -d /media/photo/ -m
pure-pw mkdb
systemctl restart pure-ftpd.service

change listen port, for example 8021

echo ",8021" > /etc/pure-ftpd/conf/Bind

Use public IP of natted ftp server and open 29799-29899 port range in firewall

cd /etc/pure-ftpd/conf
echo "yes" > DontResolve
echo "" > ForcePassiveIP
echo "29799 29899" > PassivePortRange
echo "0" > TLS
PureDB                       /etc/pureftpd.pdb
MinUID 14
echo "/bin/false" >> /etc/shells
pure-pw useradd hass -u hass -g hass -d /home/hass/camera/ -m
pure-pw mkdb
  • tips/ftp.txt
  • Last modified: 2019/06/19 09:16
  • by scipio