18
0
Fork 0
wiki/HowtoProFTPD.md

6.3 KiB

Name: foo Quota Type: User Uploaded bytes: 182536110080.00 Downloaded bytes: 0.00 Transferred bytes: 0.00 Uploaded files: 0 Downloaded files: 0 Transferred files: 0

ftpquota --show-records --type=limit


Name: foo Quota Type: User Per Session: False Limit Type: Hard Uploaded bytes: 214748364800.00 Downloaded bytes: unlimited Transferred bytes: unlimited Uploaded files: unlimited Downloaded files: unlimited Transferred files: unlimited


Via FTP, vous pourrez voir les données de quota ainsi :

ftp> quote SITE QUOTA 200-Quota pour la session actuelle [courant / limite]: 200-Nom: foo 200-Type quota: Utilisateur 200-Par session : Faux 200-Type de limite : matérielle 200- bytes: 182536110080.00/193273528320.00 envoyés 200- bytes: unlimited reçus 200- bytes: unlimited téléchargés 200- files: unlimited envoyés 200- files: unlimited reçus 200- files: unlimited téléchargés 200 Veuillez contacter ftpmaster@example.com si ces données sont inexactes


Enfin, on peut réinitialiser un compteur (tous les jours par exemple) :

ftpquota --update-record --type=tally --name=foo --quota-type=user


Ou même effacer toutes les données de quota d'un utilisateur :

ftpquota --delete-record --type=limit --name=foo --quota-type=user

ftpquota --delete-record --type=tally --name=foo --quota-type=user



## FTPS

On peut configurer FTP over SSL/TLS ainsi :

LoadModule mod_tls.c

TLSEngine on TLSLog /var/log/proftpd/tls.log TLSProtocol TLSv1

TLSRSACertificateFile /etc/ssl/certs/ftp.example.com.crt TLSRSACertificateKeyFile /etc/ssl/private/ftp.example.com.key TLSCACertificateFile /etc/ssl/certs/ftp.example.com_ca.pem

#TLSOptions AllowClientRenegotiations

TLSOptions AllowPerUser TLSVerifyClient off TLSVerifyClient on

TLSRequired off

TLSRenegotiate required off TLSOptions NoSessionReuseRequired



## SFTP

On peut configurer FTP over SSH ainsi :

LoadModule mod_tls.c

SFTPEngine on Port 222 DefaultRoot ~

SFTPLog /var/log/proftpd/sftp.log

SFTPAuthMethods password publickey SFTPHostKey /etc/ssh/ssh_host_dsa_key SFTPHostKey /etc/ssh/ssh_host_ecdsa_key SFTPHostKey /etc/ssh/ssh_host_rsa_key

SFTPAuthorizedUserKeys file:/etc/sftp/authorized_keys/%u

SFTPCompression delayed


## Logs

[fichier xferlog](http://www.castaglia.org/proftpd/doc/xferlog.html)