Partage
  • Partager sur Facebook
  • Partager sur Twitter

[Linux][ProFTPd]Login obligatoire avant transfert

Sujet résolu
    18 décembre 2006 à 17:19:35

    Bonjour,
    J'ai un serveur linux où j'ai installé proFTPD(que je configure via webmin).
    Lorsque je veux transférer un fichier sur ce serveur, je me connecte via FileZilla normalement et je transfère le fichier.

    Mais là, alors que je suis toujours connecté au serveur, il me demande mon nom d'utilisateur et mon mot de passe, que mon logiciel FTP donne.S'ensuit 5 secondes d'attente avant le feu vert du lancement de transfert... :o
    Une minute plus tard, je relance un autre téléchargement et il me le redemande, alors que si je fait le téléchargement dans la minute, il ne me le demande pas...
    Pourquoi???

    Voici un exemple de connexion:

    Citation : FileZilla

    Etat : Connexion à 192.168.0.2 ...
    Etat : Connecté à 192.168.0.2. Attente du message d'accueil...
    Réponse : 220 Bienvenue !!
    Commande : USER root
    Réponse : 331 Password required for root.
    Commande : PASS *****
    Réponse : 230 Bienvenue !!
    Commande : SYST
    Réponse : 215 UNIX Type: L8
    Commande : FEAT
    Réponse : 211-Features:
    Réponse : MDTM
    Réponse : REST STREAM
    Réponse : SIZE
    Réponse : 211 End
    Etat : Connecté
    Etat : Récupération de la liste de répertoires...
    Commande : PWD
    Réponse : 257 "/root" is current directory.
    Commande : CWD /var/www/
    Réponse : 250 CWD command successful
    Commande : PWD
    Réponse : 257 "/var/www" is current directory.
    Commande : TYPE A
    Réponse : 200 Type set to A
    Commande : PASV
    Réponse : 227 Entering Passive Mode (192,168,0,2,11,126).
    Commande : LIST
    Réponse : 150 Opening ASCII mode data connection for file list
    Réponse : 226 Transfer complete.
    Etat : Succès du listage du répertoire
    Etat : Connexion à 192.168.0.2 ...
    Etat : Connecté à 192.168.0.2. Attente du message d'accueil...
    Réponse : 220 Bienvenue !!
    Commande : USER root
    Réponse : 331 Password required for root.
    Commande : PASS *****
    Réponse : 230 Bienvenue !!
    Commande : SYST
    Réponse : 215 UNIX Type: L8
    Commande : FEAT
    Réponse : 211-Features:
    Réponse : MDTM
    Réponse : REST STREAM
    Réponse : SIZE
    Réponse : 211 End
    Etat : Connecté
    Etat : Démarrage du chargement de C:\Documents and Settings\All Users\Documents\www\index.php
    Commande : PWD
    Réponse : 257 "/root" is current directory.
    Commande : CWD /var/www/
    Réponse : 250 CWD command successful
    Commande : PWD
    Réponse : 257 "/var/www" is current directory.
    Commande : TYPE A
    Réponse : 200 Type set to A
    Commande : PASV
    Réponse : 227 Entering Passive Mode (192,168,0,2,11,128).
    Commande : STOR index.php
    Réponse : 150 Opening ASCII mode data connection for index.php
    Réponse : 226 Transfer complete.
    Etat : Chargement sur serveur réussi
    Etat : Récupération de la liste de répertoires...
    Commande : TYPE A
    Réponse : 200 Type set to A
    Commande : PASV
    Réponse : 227 Entering Passive Mode (192,168,0,2,11,129).
    Commande : LIST
    Réponse : 150 Opening ASCII mode data connection for file list
    Réponse : 226 Transfer complete.
    Etat : Succès du listage du répertoire
    Commande : REST 0
    Réponse : 350 Restarting at 0. Send STORE or RETRIEVE to initiate transfer
    Commande : PWD
    Réponse : 257 "/var/www" is current directory.
    Commande : PWD
    Réponse : 257 "/var/www" is current directory.
    Commande : PWD
    Réponse : 257 "/var/www" is current directory.
    Etat : Déconnecté du serveur
    Etat : Connexion à 192.168.0.2 ...
    Etat : Connecté à 192.168.0.2. Attente du message d'accueil...
    Commande : PWD
    Réponse : 257 "/var/www" is current directory.
    Réponse : 220 Bienvenue !!
    Commande : USER root
    Réponse : 331 Password required for root.
    Commande : PASS *****
    Réponse : 230 Bienvenue !!
    Commande : SYST
    Réponse : 215 UNIX Type: L8
    Commande : FEAT
    Réponse : 211-Features:
    Réponse : MDTM
    Réponse : REST STREAM
    Réponse : SIZE
    Réponse : 211 End
    Etat : Connecté
    Etat : Démarrage du chargement de C:\Documents and Settings\All Users\Documents\www\index.php
    Commande : PWD
    Réponse : 257 "/root" is current directory.
    Commande : CWD /var/www/
    Réponse : 250 CWD command successful
    Commande : PWD
    Réponse : 257 "/var/www" is current directory.
    Commande : TYPE A
    Réponse : 200 Type set to A
    Commande : PASV
    Réponse : 227 Entering Passive Mode (192,168,0,2,11,131).
    Commande : STOR index.php
    Réponse : 150 Opening ASCII mode data connection for index.php
    Réponse : 226 Transfer complete.
    Etat : Chargement sur serveur réussi
    Etat : Récupération de la liste de répertoires...
    Commande : TYPE A
    Réponse : 200 Type set to A
    Commande : PASV
    Réponse : 227 Entering Passive Mode (192,168,0,2,11,132).
    Commande : LIST
    Réponse : 150 Opening ASCII mode data connection for file list
    Réponse : 226 Transfer complete.
    Etat : Succès du listage du répertoire



    Le fichier de configuration:

    Citation : /etc/proftpd.conf

    #
    # Includes required DSO modules. This is mandatory in proftpd 1.3
    #
    #Include /etc/proftpd/modules.conf
    #
    #
    # /etc/proftpd.conf -- This is a basic ProFTPD configuration file.
    # To really apply changes reload proftpd after modifications.
    #

    ServerName "Serveur"
    ServerType standalone
    DeferWelcome off

    DefaultServer on
    ShowSymlinks on


    DisplayLogin welcome.msg
    DisplayFirstChdir .message
    ListOptions "-l"


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

    # Uncomment this if you would use TLS module:
    #TLSEngine on

    # Uncomment this if you would use quota module:
    #Quotas on

    # Uncomment this if you would use ratio module:
    #Ratios on

    # Port 21 is the standard FTP port.
    Port 21

    # 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 nobody
    Group nogroup

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


    AllowStoreRestart On

    # Delay engine reduces impact of the so-called Timing Attack described in
    # http://security.lss.hr/index.php?page=details&ID=LSS-2004-10-02
    # It is on by default.
    #DelayEngine off

    # A basic anonymous configuration, no upload directories.

    # <Anonymous ~ftp>
    # User ftp
    # Group nogroup
    # # We want clients to be able to login with "anonymous" as well as "ftp"
    # UserAlias anonymous ftp
    # # Cosmetic changes, all files belongs to ftp user
    # DirFakeUser on ftp
    # DirFakeGroup on ftp
    #
    # RequireValidShell off
    #
    # # Limit the maximum number of anonymous logins
    # MaxClients 10
    #
    # # We want 'welcome.msg' displayed at login, and '.message' displayed
    # # in each newly chdired directory.
    # DisplayLogin welcome.msg
    # DisplayFirstChdir .message
    #
    # # Limit WRITE everywhere in the anonymous chroot
    # <Directory *>
    # <Limit READ WRITE>
    # AllowAll
    # </Limit>
    # </Directory>
    #
    # # Uncomment this if you're brave.
    # # <Directory incoming>
    # # # Umask 022 is a good standard umask to prevent new files and dirs
    # # # (second parm) from being group and world writable.
    # # Umask 777 777
    # # <Limit READ WRITE>
    # # DenyAll
    # # </Limit>
    # # <Limit STOR>
    # # AllowAll
    # # </Limit>
    # # </Directory>
    #
    # </Anonymous>

    <Global>
    RequireValidShell off
    AllowForeignAddress on
    AllowRetrieveRestart on
    AllowStoreRestart on
    DeleteAbortedStores on
    HiddenStor off
    DirFakeGroup off
    DirFakeUser off
    LoginPasswordPrompt off
    AccessGrantMsg "Bienvenue !!"
    RootLogin on
    UseFtpUsers off
    <Directory /var/www>
    AllowRetrieveRestart on
    AllowStoreRestart on
    DeleteAbortedStores on
    HiddenStor off
    HideNoAccess off
    AllowAll
    AllowOverwrite on
    ListOptions "-a"
    Umask 777 777
    </Directory>
    <Directory /.>
    Umask 777 777
    AllowAll
    AllowOverwrite on
    </Directory>
    AllowOverwrite on
    ServerIdent on "Bienvenue !!"
    DeferWelcome on
    </Global>

    <VirtualHost 192.168.0.2>
    DirFakeGroup off
    DirFakeUser off
    ServerName "LTPG2"
    Umask 777 777
    AllowOverwrite on
    RootLogin on
    </VirtualHost>
    DirFakeGroup off
    DirFakeUser off
    SocketBindTight on
    RootLogin on
    TimeoutIdle 36000
    TimeoutLogin 2
    TimeoutNoTransfer 3600
    TimeoutStalled 3600


    Qu'est-ce qui cloche???


    Autre question, j'aimerai faire des utilisateurs pour le ftp mais ils ont accès au DD... Comment les limiter(au pire je fait un petit FTP en php mais bon >_<
    • Partager sur Facebook
    • Partager sur Twitter
      21 décembre 2006 à 0:37:04

      Waou...


      Deja tu met le root login sur allow, c'est pas génial...
      Le premier crétin voulant craquer ton ftp par brute force essayeras avec user root.
      En plus t'as un mot de passe faible (5 caractères).

      Citation : Cube45@filezilla

      Réponse : 331 Password required for root.
      Commande : PASS *****


      Autre chose :

      Si tu utilise ton ftp uniquement pour passer des fichiers, alors, oublie.
      C'est trop faible côté sécurité (surtout si tu te loge en root) Les pass circulent en clair sur le réseau. Un coup de sniffer et c'est cuit.
      Au pire des cas, certains serveurs ftp permettent le ssl (je crois pas que Proftp fournisse le support ssl) pour crypter la transmission. Si tu veut rester en ftp, utilise plutot vsftpd (compilé avec le support ssl).C'est plus sécurisé mais pas hyper pratique à l'usage parce qu'il faut un client compatible (filezilla sous win).

      Un conseil : Laisse tomber le FTP et passe au transfert de fichiers par SSH


      Le top du top : un ssh et sftp/scp. Tu installe Openssh et tu peut passer des fichiers, avoir une console, faire de l'export display, du tunneling ssh etc.. et tout ça crypté.

      Pour passer des fichiers de Un*x vers Un*x par SSH, tu peut te servir de la console (ou de nautilus si t'as gnome (Raccourcis->Se connecter à un serveur)).
      De Win vers Un*x on utilise winscp et putty.

      Pour nautilus et winscp, c'est un interface style explorateur de fichiers.

      Sinon, pour ta question :

      Filezilla se déconnecte par défaut au bout de 30 secondes d'innactivité, jette un oeil dans paramètres :p

      Mais franchement, laisse tomber le ftp pour le ssh...

      --------------------------------
      Cordialement. Choukette
      --------------------------------

      Edit :

      pour les nouveaux users, avec ssh, tu créer un utilisateur local et ils peuvent se connecter dessus (pense à chrooter et à désactiver su, sudo et assimilés.)

      Pour proftp, comme on dit : RTFM (read the fu**ing manual).

      Bonne chance.
      • Partager sur Facebook
      • Partager sur Twitter
        21 décembre 2006 à 8:04:04

        Peut-être regarder du coté de ces valeurs

        TimeoutIdle 36000
        TimeoutLogin 2
        TimeoutNoTransfer 3600
        TimeoutStalled 3600
        • Partager sur Facebook
        • Partager sur Twitter

        [Linux][ProFTPd]Login obligatoire avant transfert

        × Après avoir cliqué sur "Répondre" vous serez invité à vous connecter pour que votre message soit publié.
        × Attention, ce sujet est très ancien. Le déterrer n'est pas forcément approprié. Nous te conseillons de créer un nouveau sujet pour poser ta question.
        • Editeur
        • Markdown