pkg install proftpd-1.3.6b
vim /usr/local/etc/proftpd.conf DefaultRoot ~ PassivePorts 60000 65000
echo 'proftpd_enable="YES"' >> /etc/rc.conf service proftpd start
En local : OK
En ligne : NOK
Commande : MLSD Erreur : La connexion des données ne peut pas être établie : ECONNREFUSED - Connexion refusée par le serveur Erreur : Affichage du contenu du dossier annulée par l'utilisateur Statut : Déconnecté du serveur
ftpasswd --name ftpuser --file /usr/local/etc/proftpd/ug/ftpd.passwd -home /usr/ftp --uid 1004 --gid 1004 --shell /sbin/nologin --passwd
ftpasswd --name spy1 --file /usr/local/etc/proftpd/ug/ftpd.passwd -home /vftp/proftp/spy1 --uid 1004 --gid 1004 --shell /sbin/nologin --passwd ftpasswd: using alternate file: /usr/local/etc/proftpd/ug/ftpd.passwd ftpasswd: creating passwd entry for user spy1 ftpasswd: /sbin/nologin is not among the valid system shells. Use of ftpasswd: "RequireValidShell off" may be required, and the PAM ftpasswd: module configuration may need to be adjusted.
Cette commande crée un fichier /usr/local/etc/proftpd/ug/ftpd.passwd
ls -lh /usr/local/etc/proftpd/ug/ftpd.passwd cat /usr/local/etc/proftpd/ug/ftpd.passwd
ftpasswd --group --name ftpgroup --gid 1004 --member ftpuser
Cette commande crée un fichier /usr/local/etc/proftpd/ug/ftpd.group
ls -lh /usr/local/etc/proftpd/ug/ftpd.passwd cat /usr/local/etc/proftpd/ug/ftpd.group
vim /usr/local/etc/proftpd.conf ServerIdent off RequireValidShell off AuthUserFile /usr/local/etc/proftpd/ug/ftpd.passwd AuthGroupFile /usr/local/etc/proftpd/ug/ftpd.group
chown -R 1004:1004 /usr/ftp/ ls -l /usr/
proftpd -l
mod_core.c
mod_xfer.c
mod_rlimit.c
mod_auth_unix.c
mod_auth_file.c
mod_auth.c
mod_ls.c
mod_log.c
mod_site.c
mod_delay.c
mod_facts.c
mod_dso.c
mod_ident.c
mod_auth_pam.c
mod_ctrls.c
mod_lang.c
vim /usr/local/etc/proftpd.conf <IfModule mod_dco.c> LoadModule mod_tls.c </IfModule> <IfModule mod_tls.c> TLSEngine on TLSog /var/log/proftp-tls.log TLSProtocol SSv3 TLSv1 TLSRequired off TLSECCertificateFile /usr/local/etc/proftpd/ssl/proftpd.cert.pem TLSECCertificateKeyFile /usr/local/etc/proftpd/ssl/proftpd.key.pem TLSVerifyClient off TLSRenegotiate none </IfModule>
cd /usr/local/etc/proftpd mkdir ssl cd ssl
openssl req -x509 -nodes -newkey rsa:8192 -sha256 \ -keyout /usr/local/etc/proftpd/ssl/proftpd.key.pem \ -out /usr/local/etc/proftpd/ssl/proftpd.cert.pem
ls /usr/local/etc/proftpd/ssl proftpd.cert.pem proftpd.key.pem
touch /var/log/proftpd-tls.log