
En aquest article explique com he instal·lat i com he configurat un servidor FTP a la Raspberry Pi 4 on tinc FreeBSD 13 funcionant 24x7.
Si volem muntar un servidor FTP, tenim diferents opcions com el proftpd o pure-ftp, però Very Secure FTP Daemon o, el nom curt, vsftpd és lleuger, estable i ràpid. Per això he decidit aquesta opció. El repository a Github és aquest: https://github.com/InfrastructureServices/vsftpd però anem a instal·lar el paquet de FreeBSD.
Primer de tot, cercarem el nom al repositori de paquets de FreeBSD:
$ doas pkg search vsftpd
vsftpd-ext-3.0.3.1_3 FTP daemon that aims to be "very secure". Extended build
vsftpd-ssl-3.0.5_2 FTP daemon that aims to be "very secure"
Instal·larem vsftp així:
$ doas pkg install vsftpd-ext
Per a que s'inicie sempre quan iniciem la màquina, editarem /etc/rc.conf i afegirem:
vsftpd_enable="YES"
I ara configurarem vsftpd des del fitxer de configuració /usr/local/etc/vsftpd.conf
Les meues configuracions de vsftpd
Habilitem les últimes línies del fitxer, descomentant el listen=YES i el background=YES així:
# If using vsftpd in standalone mode, uncomment the next two lines:
listen=YES
background=YES
Per últim, ja podem reiniciar, aturar o iniciar el servei de vsftpd a mesura que fem nous canvis en la configuració o fem proves amb els directoris que compartim.
Iniciarem el servei de la següent manera:
$ doas service vsftpd start
Starting vsftpd.