[FTP] Proftp & Failed binding to 0.0.0.0

Fermé
tom@ Messages postés 202 Date d'inscription lundi 21 mars 2005 Statut Membre Dernière intervention 15 juin 2022 - Modifié par tom@ le 6/07/2012 à 22:14
mamiemando Messages postés 33077 Date d'inscription jeudi 12 mai 2005 Statut Modérateur Dernière intervention 18 avril 2024 - 10 juil. 2012 à 10:25
Bonjour,
Proftpd est (ré)installé.
La commande #proftpd -nd6 me donne ceci :
[...]  
ubuntu proftpd[5751] ubuntu: deleting existing scoreboard '/var/run/proftpd.scoreboard'  
ubuntu proftpd[5751] ubuntu: Failed binding to 0.0.0.0, port 21: Adresse déjà utilisée  
ubuntu proftpd[5751] ubuntu: Check the ServerType directive to ensure you are configured correctly.  

Je n'y avais pas prêté attention au début (LIGNE 2), lors de la première installation!
Sur un site (http://www.proftpd.de/FAQ.15.0.html), j'ai découvert une solution. Seulement, ni xinetd et inetd sont installés sur le pc. Je ne peut donc pas trouver de moyen de résoudre l'echec de liaison à 0.0.0.0...
Avant de vous donner le rendu de quelques commandes, voici ma configuration pour proftpd:
proftpd.conf
# Includes DSO modules  
Include /etc/proftpd/modules.conf  

# Set off to disable IPv6 support which is annoying on IPv4 only boxes.  
UseIPv6                         off  
# If set on you can experience a longer connection delay in many cases.  
IdentLookups                    on  
#UseReverseDNS                  off  

ServerName                      "Server FTP (01)"  
ServerType                      standalone  
DeferWelcome                    off  
#ServerIdent: Si off,on cache la version du serveur.  
ServerIdent                     off  

MultilineRFC2228                on  
DefaultServer                   on  
ShowSymlinks                    on  

TimeoutNoTransfer               600  
TimeoutStalled                  600  
TimeoutIdle                     1200  

# Includes DSO modules  
Include /etc/proftpd/modules.conf  

# Set off to disable IPv6 support which is annoying on IPv4 only boxes.  
UseIPv6                         off  
# If set on you can experience a longer connection delay in many cases.  
IdentLookups                    on  
#UseReverseDNS                  off  

ServerName                      "Server FTP (01)"  
ServerType                      standalone  
DeferWelcome                    off  
#ServerIdent: Si off,on cache la version du serveur.  
ServerIdent                     off  

MultilineRFC2228                on  
DefaultServer                   on  
ShowSymlinks                    on  

TimeoutNoTransfer               600  
TimeoutStalled                  600  
TimeoutIdle                     1200  

# firewall limitations. Ephemeral ports can be used for that, but  
# feel free to use a more narrow range.  
PassivePorts                  5000 5100  

# If your host was NATted, this option is useful in order to  
# allow passive tranfers to work. You have to use your public  
# address and opening the passive ports used on your firewall as well.  
MasqueradeAddress               192.168.X.X  

# This is useful for masquerading address with dynamic IPs:  
# refresh any configured MasqueradeAddress directives every 8 hours  
<IfModule mod_dynmasq.c>  
# DynMasqRefresh 28800  
</IfModule>  

# To prevent DoS attacks, set the maximum number of child processes  
# to 30.  If you need to allow more than 30 concurrent connections  
# at once, simply increase this value.  Note that this ONLY works  
# in standalone mode, in inetd mode you should use an inetd server  
# that allows you to limit maximum number of processes per service  
# (such as xinetd)  
MaxInstances                    30  

# Set the user and group that the server normally runs at.  
User                            proftpd  
Group                           nogroup  

# Umask 022 is a good standard umask to prevent new files and dirs  
# (second parm) from being group and world writable.  
Umask                           022  022  
# Normally, we want files to be overwriteable.  
AllowOverwrite                  on  

# Autorise les clients à reprendre les Uploads vers vous.  
# AllowStoreRestart             on  
   
# Autorise seulement les noms de fichiers normaux (caractères alphanumérique)  
PathAllowFilter                 "[a-zA-Z0-9]"  

# Refuse l'upload de fichiers .ftpaccess ou .htaccess  
PathDenyFilter "(\.ftp)|(\.hta)[a-z]+$"  
   
# N'autorise pas de passer des printf-Formats.  
AllowFilter "^[a-zA-Z0-9@~ /,_.-]*$"  
DenyFilter "%"  
   
# Récupère l'ip de la machine de l'utilisateur, si "on".  
#IdentLookups                    off  

# Uncomment this if you are using NIS or LDAP via NSS to retrieve passwords:  
# PersistentPasswd              off  

# This is required to use both PAM-based authentication and local passwords  
# AuthOrder                     mod_auth_pam.c* mod_auth_unix.c  

# Be warned: use of this directive impacts CPU average load!  
# Uncomment this if you like to see progress and transfer rate with ftpwho  
# in downloads. That is not needed for uploads rates.  
#  
# UseSendFile                   off  

TransferLog /var/log/proftpd/xferlog  
SystemLog   /var/log/proftpd/proftpd.log  

# Logging onto /var/log/lastlog is enabled but set to off by default  
#UseLastlog on  

# In order to keep log file dates consistent after chroot, use timezone info  
# from /etc/localtime.  If this is not set, and proftpd is configured to  
# chroot (e.g. DefaultRoot or <Anonymous>), it will use the non-daylight  
# savings timezone regardless of whether DST is in effect.  
#SetEnv TZ :/etc/localtime  

<IfModule mod_quotatab.c>  
QuotaEngine off  
</IfModule>  

<IfModule mod_ratio.c>  
Ratios off  
</IfModule>  


# Delay engine reduces impact of the so-called Timing Attack described in  
# https://www.securityfocus.com/bid/11430/discuss  

<IfModule mod_delay.c>  
DelayEngine on  
</IfModule>  

<IfModule mod_ctrls.c>  
ControlsEngine        off  
ControlsMaxClients    2  
ControlsLog           /var/log/proftpd/controls.log  
ControlsInterval      5  
ControlsSocket        /var/run/proftpd/proftpd.sock  
</IfModule>  

<IfModule mod_ctrls_admin.c>  
AdminControlsEngine off  
</IfModule>  

#  
# Alternative authentication frameworks  
#  
#Include /etc/proftpd/ldap.conf  
Include /etc/proftpd/sql.conf  

#  
# This is used for FTPS connections  
#  
Include /etc/proftpd/tls.conf  

#  
<IfModule mod_delay.c>  
DelayEngine on  
</IfModule>  

<IfModule mod_ctrls.c>  
ControlsEngine        off  
ControlsMaxClients    2  
ControlsLog           /var/log/proftpd/controls.log  
ControlsInterval      5  
ControlsSocket        /var/run/proftpd/proftpd.sock  
</IfModule>  

<IfModule mod_ctrls_admin.c>  
AdminControlsEngine off  
</IfModule>  

#  
# Alternative authentication frameworks  
#  
#Include /etc/proftpd/ldap.conf  
Include /etc/proftpd/sql.conf  

[...]


Et, le résultat de quelques commandes:

#netstat -taupen --tcp | grep :21
# netstat -taupen --tcp | grep :21  

tcp        0      0 0.0.0.0:21              0.0.0.0:*               LISTEN      118        20710       5383/proftpd: (acce  


#proftpd -td5:
ubuntu proftpd[5822]: disabling runtime support for IPv6 connections  
ubuntu proftpd[5822]: DenyFilter: compiling regex '\*.*/'  
ubuntu proftpd[5822]: <Directory />: adding section for resolved path '/'  
ubuntu proftpd[5822]: <IfModule>: using 'mod_dynmasq.c' section at line 70  
ubuntu proftpd[5822]: PathAllowFilter: compiling allow regex '[a-zA-Z0-9]'  
ubuntu proftpd[5822]: PathDenyFilter: compiling deny regex '(.ftp)|(.hta)[a-z]+$'  
ubuntu proftpd[5822]: AllowFilter: compiling regex '^[a-zA-Z0-9@~ /,_.-]*$'  
ubuntu proftpd[5822]: DenyFilter: compiling regex '%'  
ubuntu proftpd[5822]: <IfModule>: using 'mod_quotatab.c' section at line 132  
ubuntu proftpd[5822]: <IfModule>: using 'mod_ratio.c' section at line 136  
ubuntu proftpd[5822]: <IfModule>: using 'mod_delay.c' section at line 144  
ubuntu proftpd[5822]: <IfModule>: using 'mod_ctrls.c' section at line 148  
ubuntu proftpd[5822]: <IfModule>: using 'mod_ctrls_admin.c' section at line 156  
ubuntu proftpd[5822]: <IfModule>: using 'mod_sql.c' section at line 7  
ubuntu proftpd[5822]: <IfModule>: using 'mod_tls.c' section at line 9  
ubuntu proftpd[5822] ubuntu: 127.0.1.1:21 masquerading as 192.168.1.2  
ubuntu proftpd[5822] ubuntu:   
ubuntu proftpd[5822] ubuntu Config for Server FTP (01):  
ubuntu proftpd[5822] ubuntu-: /  
ubuntu proftpd[5822] ubuntu:  Limit  
ubuntu proftpd[5822] ubuntu:   IgnoreHidden  
ubuntu proftpd[5822] ubuntu:  HideFiles  
ubuntu proftpd[5822] ubuntu:  ShowSymlinks  
ubuntu proftpd[5822] ubuntu:  TimeoutNoTransfer  
ubuntu proftpd[5822] ubuntu:  TimeoutStalled  
ubuntu proftpd[5822] ubuntu:  TimeoutIdle  
ubuntu proftpd[5822] ubuntu:  DisplayLogin  
ubuntu proftpd[5822] ubuntu:  DisplayChdir  
ubuntu proftpd[5822] ubuntu:  ListOptions  
ubuntu proftpd[5822] ubuntu:  DenyFilter  
ubuntu proftpd[5822] ubuntu:  RootLogin  
ubuntu proftpd[5822] ubuntu:  RequireValidShell  
ubuntu proftpd[5822] ubuntu:  Umask  
ubuntu proftpd[5822] ubuntu:  DirUmask  
ubuntu proftpd[5822] ubuntu:  AllowOverwrite  
ubuntu proftpd[5822] ubuntu:  PathAllowFilter  
ubuntu proftpd[5822] ubuntu:  PathDenyFilter  
ubuntu proftpd[5822] ubuntu:  AllowFilter  
ubuntu proftpd[5822] ubuntu:  TransferLog  
ubuntu proftpd[5822] ubuntu:  Ratios  
ubuntu proftpd[5822] ubuntu:  TLSRequired  
ubuntu proftpd[5822] ubuntu: IdentLookups  
ubuntu proftpd[5822] ubuntu: DeferWelcome  
ubuntu proftpd[5822] ubuntu: ServerIdent  
ubuntu proftpd[5822] ubuntu: MultilineRFC2228  
ubuntu proftpd[5822] ubuntu: DefaultServer  
ubuntu proftpd[5822] ubuntu: ShowSymlinks  
ubuntu proftpd[5822] ubuntu: TimeoutNoTransfer  
ubuntu proftpd[5822] ubuntu: TimeoutStalled  
ubuntu proftpd[5822] ubuntu: TimeoutIdle  
ubuntu proftpd[5822] ubuntu: DisplayLogin  
ubuntu proftpd[5822] ubuntu: DisplayChdir  
ubuntu proftpd[5822] ubuntu: ListOptions  
ubuntu proftpd[5822] ubuntu: DenyFilter  
ubuntu proftpd[5822] ubuntu: DefaultRoot  
ubuntu proftpd[5822] ubuntu: RootLogin  
ubuntu proftpd[5822] ubuntu: RequireValidShell  
ubuntu proftpd[5822] ubuntu: PassivePorts  
ubuntu proftpd[5822] ubuntu: MasqueradeAddress  
ubuntu proftpd[5822] ubuntu: UserID  
ubuntu proftpd[5822] ubuntu: UserName  
ubuntu proftpd[5822] ubuntu: GroupID  
ubuntu proftpd[5822] ubuntu: GroupName  
ubuntu proftpd[5822] ubuntu: Umask  
ubuntu proftpd[5822] ubuntu: DirUmask  
ubuntu proftpd[5822] ubuntu: AllowOverwrite  
ubuntu proftpd[5822] ubuntu: PathAllowFilter  
ubuntu proftpd[5822] ubuntu: PathDenyFilter  
ubuntu proftpd[5822] ubuntu: AllowFilter  
ubuntu proftpd[5822] ubuntu: DenyFilter  
ubuntu proftpd[5822] ubuntu: TransferLog  
ubuntu proftpd[5822] ubuntu: QuotaEngine  
ubuntu proftpd[5822] ubuntu: Ratios  
ubuntu proftpd[5822] ubuntu: DelayEngine  
ubuntu proftpd[5822] ubuntu: SQLBackend  
ubuntu proftpd[5822] ubuntu: SQLAuthTypes  
ubuntu proftpd[5822] ubuntu: SQLConnectInfo  
ubuntu proftpd[5822] ubuntu: SQLUserTable  
ubuntu proftpd[5822] ubuntu: SQLUsernameField  
ubuntu proftpd[5822] ubuntu: SQLPasswordField  
ubuntu proftpd[5822] ubuntu: SQLUidField  
ubuntu proftpd[5822] ubuntu: SQLGidField  
ubuntu proftpd[5822] ubuntu: SQLHomedirField  
ubuntu proftpd[5822] ubuntu: SQLShellField  
ubuntu proftpd[5822] ubuntu: SQLGroupTable  
ubuntu proftpd[5822] ubuntu: SQLGroupnameField  
ubuntu proftpd[5822] ubuntu: SQLGroupGIDField  
ubuntu proftpd[5822] ubuntu: SQLGroupMembersField  
ubuntu proftpd[5822] ubuntu: SQLLog_PASS  
ubuntu proftpd[5822] ubuntu: SQLNamedQuery_updatecount  
ubuntu proftpd[5822] ubuntu: SQLLog_STOR  
ubuntu proftpd[5822] ubuntu: SQLLog_DELE  
ubuntu proftpd[5822] ubuntu: SQLNamedQuery_modified  
ubuntu proftpd[5822] ubuntu: TLSEngine  
ubuntu proftpd[5822] ubuntu: TLSLog  
ubuntu proftpd[5822] ubuntu: TLSOptions  
ubuntu proftpd[5822] ubuntu: TLSRSACertificateFile  
ubuntu proftpd[5822] ubuntu: TLSRSACertificateKeyFile  
ubuntu proftpd[5822] ubuntu: TLSVerifyClient  
ubuntu proftpd[5822] ubuntu: TLSRequired  
ubuntu proftpd[5822] ubuntu: mod_lang/0.9: skipping possible language 'ko_KR': not supported by setlocale(3); see 'locale -a'  
ubuntu proftpd[5822] ubuntu: mod_lang/0.9: skipping possible language 'zh_TW': not supported by setlocale(3); see 'locale -a'  
ubuntu proftpd[5822] ubuntu: mod_lang/0.9: skipping possible language 'bg_BG': not supported by setlocale(3); see 'locale -a'  
ubuntu proftpd[5822] ubuntu: mod_lang/0.9: skipping possible language 'ja_JP': not supported by setlocale(3); see 'locale -a'  
ubuntu proftpd[5822] ubuntu: mod_lang/0.9: skipping possible language 'ru': not supported by setlocale(3); see 'locale -a'  
ubuntu proftpd[5822] ubuntu: mod_lang/0.9: skipping possible language 'it': not supported by setlocale(3); see 'locale -a'  
ubuntu proftpd[5822] ubuntu: mod_tls/2.4.3: passphrase locked into memory  
Syntax check complete.  



#fuser -n tcp 21

21/tcp:               5383

Si j'arrête le processus avec " kill " et que je redémarre le service de proftpd, le processus réapparaît de nouveau.

#netstat -panta
Proto Recv-Q Send-Q Adresse locale          Adresse distante        Etat       PID/Program name  
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      1002/mysqld       
tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN      1321/apache2      
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      1321/apache2      
tcp        0      0 0.0.0.0:21              0.0.0.0:*               LISTEN      5383/proftpd: (acce  
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      1080/dnsmasq      
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      801/sshd          
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      880/cupsd         
tcp        0      0 192.168.X.X:22          192.168.Y.Y:36154      ESTABLISHED 3282/sshd: XX  
tcp        0    240 192.168.X.X:22          192.168.Y.Y:36281      ESTABLISHED 5407/sshd: XX  
tcp        1      0 192.168.X.X:52406       91.189.89.144:80        CLOSE_WAIT  1765/ubuntu-geoip-p  
tcp6       0      0 :::22                   :::*                    LISTEN      801/sshd          
tcp6       0      0 ::1:631                 :::*                    LISTEN      880/cupsd         


Au regard de ces informations, pouvez-vous apporter une solution?

Merci, pour vos remarques, par avance!

Tom@

A voir également:

2 réponses

mamiemando Messages postés 33077 Date d'inscription jeudi 12 mai 2005 Statut Modérateur Dernière intervention 18 avril 2024 7 748
7 juil. 2012 à 21:39
Ça m'a l'air bien compliqué pour installer proftpd. À moins que tu aies besoin d'une configuration spécifique, je t'invite à repartir sur des bases saines :

sudo apt-get update
sudo apt-get install aptitude
sudo aptitude update
sudo aptitude safe-upgrade
sudo aptitude purge proftpd-basic
sudo aptitude install proftpd-basic 


Pour démarrer / arrêter / redémarrer /... proftpd, passe par la commande service (tu n'as jamais à instancier proftpd d'une autre manière) :

sudo service proftpd stop
sudo service proftpd start
sudo service proftpd restart


Par défaut, proftpd est configuré pour que chaque utilisateur linux soit associé à un utilisateur ftp. Ainsi, si par exemple sous linux tu te loggues en "toto" avec le mot de passe "plop", tu peux faire de même via ftp (et tu arriveras dans /home/toto). Il est bien entendu possible de corriger la configuration de proftpd pour avoir d'autres comportements.

Bonne chance
0
tom@ Messages postés 202 Date d'inscription lundi 21 mars 2005 Statut Membre Dernière intervention 15 juin 2022 50
8 juil. 2012 à 22:19
Salut, oui c'est pas simple de configurer et d'administrer un serveur. J'ai choisi Proftpd car il a de nombreuses options .
Le problème est toujours là.

Je n'ai pas choisi une utilisation ssh, avec un client ftp et les utilisateurs système. La raison est simple, j'utilise une base de données pour les utilisateurs (Virtuels).
De plus , je souhaites une utilisation avec TLS/SSL .

Je te remercie pour ta réponse.

NB: J'ai déjà réinstallé le serveur , mais sans "aptitude" car je ne le préfère pas;) .J'ai pris l'habitude de apt... Ceci dit, ce n'est pas résolu , même si cela ne semble pas gêner pour une connexion sur mon serveur ftp....
0
mamiemando Messages postés 33077 Date d'inscription jeudi 12 mai 2005 Statut Modérateur Dernière intervention 18 avril 2024 7 748
Modifié par mamiemando le 9/07/2012 à 00:03
Est-ce que tu peux purger le paquet le réinstaller et me confirmer que dans ce contexte tu arrives à te connecter avec ton profil linux ?

Peu importe que tu utilises aptitude ou autre chose, pour moi il faut que tu repartes d'une configuration propre (ie celle par défaut pour commencer) d'où la purge. Tu peux également faire une purge via apt-get (voir option --purge).

Une fois que ceci sera fait, on verra comment ajouter des utilisateurs virtuels identifiés via une base de données.

Bonne chance
0
tom@ Messages postés 202 Date d'inscription lundi 21 mars 2005 Statut Membre Dernière intervention 15 juin 2022 50
9 juil. 2012 à 22:12
Oui je confirme! Je peut utiliser mes profils linux, si je part d'une configuration ,sans mysql, en ssl.

Pour l'utilisation de apt-get purge "le paquet"et réinstaller proftpd, je l'ai fait. Je précises qu'au début proftpd-basic était installé. Mais, lors de la seconde installation , j'ai installé proftpd (non pas la version basique) .
Du moins , c'est ce que je pense.

Pour les utilisateurs virtuels à l'aide d' une bases de données, pourquoi pas le faire! J'ai déjà commencé... Mais, il y a que la table des groupes et des utilisateurs.Je sais qu'on peut mettre des quotas. Mais, je me demande si on peut faire mieux.Ou, si il existe d'autres tables...
0
mamiemando Messages postés 33077 Date d'inscription jeudi 12 mai 2005 Statut Modérateur Dernière intervention 18 avril 2024 7 748
Modifié par mamiemando le 10/07/2012 à 10:54
Mais, lors de la seconde installation , j'ai installé proftpd (non pas la version basique).

En fait c'est pareil, proftpd est un paquet virtuel qui installe proftpd-basic en cascade.

(mando@aldur) (~) $ aptitude show proftpd  
Pas de version courante ou candidate trouvée pour proftpd  
Paquet : proftpd  
État: n'est pas un paquet réel  
Fourni par : proftpd-basic


Si tu veux vérifier ce qui est installé :

dpkg -l | grep "^ii" | grep proftpd


Pour les utilisateurs virtuels à l'aide d' une bases de données, pourquoi pas le faire! J'ai déjà commencé... Mais, il y a que la table des groupes et des utilisateurs.Je sais qu'on peut mettre des quotas. Mais, je me demande si on peut faire mieux.Ou, si il existe d'autres tables...

Alors je l'ai fait il y a pas longtemps avec un serveur postgresql mais je pense que c'est le même principe. Pour le moment je pense que tu dois faire une chose à la fois (d'abord l'authentification avec la base, ensuite ssl) pour éviter de conjuguer d'éventuels problèmes.

aptitude install proftpd-mod-mysql


Ensuite dans l'idée il faut configurer /etc/proftpd/sql.conf (tu as un template dans /usr/share/proftpd/templates/sql.conf si besoin) et activer le support sql dans /etc/proftpd/proftpd.conf. Dans le fichier sql.conf tu devras principalement indiquer le sgbd (mysql dans ton cas), l'utilisateur mysql et son mot de passe, l'adresse du serveur mysql (localhost je suppose dans ton cas ?), le schéma (la base) à utiliser, et la requête mysql qui permet de chopper des informations sur les utilisateurs.

Cette table mysql doit au moins contenir le nom d'utilisateur, son "home" au sens ftp, et son mot de passe. Tu peux éventuellement aussi avoir une colonne pour l'UID et le GID à utiliser lorsqu'il upload des fichiers. Si tu ne veux pas les préciser il est possible de préciser dans sql.conf une valeur par défaut à utiliser. Comme ce n'est pas forcément trivial à déboguer, je t'invite aussi à activer les log sql pour proftpd.

/etc/proftpd/proftpd.conf (extrait)

...  
DefaultRoot         ~  
SQLLogFile /var/log/proftpd/sql.log  
...
#
# Alternative authentication frameworks
#
#Include /etc/proftpd/ldap.conf
#Include /etc/proftpd/sql.conf

Include /etc/proftpd/sql.conf
...


/etc/proftpd/sql.conf (ici avec postgresql)

Dans cet exemple proftpd est configuré pour se connecter à postgresql et permettre à un utilisateur d'uploader des données dans /var/ftp/uploads. Les fichiers uploadés appartiennent à proftpd:nogroup.

#  
# Proftpd sample configuration for SQL-based authentication.  
#  
# (This is not to be used if you prefer a PAM-based SQL authentication)  
#  

<IfModule mod_sql.c>  
#  
# Choose a SQL backend among MySQL or PostgreSQL.  
# Both modules are loaded in default configuration, so you have to specify the backend   
# or comment out the unused module in /etc/proftpd/modules.conf.  
# Use 'mysql' or 'postgres' as possible values.  
#  
#SQLBackend mysql  
#  
#SQLEngine on  
#SQLAuthenticate on  

# http://blog.sdewitte.net/post/2010/11/24/Utiliser-proftpd-avec-une-base-de-donn%C3%A9es-PostgreSQL  
SQLBackend postgres  
SQLEngine on  
SQLAuthenticate on  

#  
# Use both a crypted or plaintext password   
#SQLAuthTypes Crypt Plaintext  
#  
# Use a backend-crypted or a crypted password  
#SQLAuthTypes Backend Crypt   

SQLAuthTypes Crypt Plaintext  

#  
# Connection   
#SQLConnectInfo proftpd@sql.example.com proftpd_user proftpd_password  
#  

# SQLConnectInfo dbname@host dbuser dbpasswd  
SQLConnectInfo mabase@localhost monutilisateursql monpasswordsql  

# Describes both users/groups tables  
#  
#SQLUserInfo users userid passwd uid gid homedir shell  
#SQLGroupInfo groups groupname gid members  

# We don't store in our postgresql table:  
# - the home directory   
# - the UID used if a user uploads a file   
# - the GID used if a user uploads a file  
# => we define default values (Here UID=113 <-> proftpd)  
# - SQLDefaultUID : "proftpd" user (see /etc/passwd)  
# - SQLDefaultGID : "nogroup" group (see /etc/group)  
# - SQLDefaultHomedir : the ftp root directory owned by this user  
# http://www.proftpd.org/docs/directives/linked/config_ref_SQLUserInfo.html  
SQLDefaultUID     113  
SQLDefaultGID     65534  
SQLDefaultHomedir /var/ftp/uploads


Dans cet exemple il ne faut évidemment pas oublier de créer le répertoire dans lequel on upload.

mkdir -p  /var/ftp/uploads  
chown proftpd:nogroup /var/ftp/uploads


Une fois que tu veux tester la configuration, pense à relancer proftpd :

service proftpd restart


Ensuite il ne reste plus qu'à remplir la base et essayer de te connecter. Au préalable affiche les logs dans un terminal :

tail -f  /var/log/proftpd/sql.log


... passe quelques lignes en appuyant sur entrée pour t'y retrouver et ne pas être pollué par les messages précédents, puis tente de te connecter dans un autre terminal :

ftp localhost


Si la connexion échoue, regarde ce que racontent les logs.

Bonne chance
0