Benvenuto nella nostra community, registra un account gratuito ADESSO!
Oltre 7000 persone hanno già registrato il loro account. Chiedi aiuto, conversa con aziende ed esperti del settore webhosting italiano.
Iscriviti subito! In meno di 2 minuti!




Risultati da 1 a 3 di 3
  1. #1
    Nuovo utente
    Data Registrazione
    Jan 2008
    Messaggi
    1

    Proftpd con mysql su Ubuntu

    Salve a tutti ragazzi, questo è il mio primo post su questo forum. Scrivo perchè questo problema mi sta praticamente tormentando.
    Il mio obiettivo è quello di creare un server ftp con utenti virtuali (indipendenti da quelli di sistema). Ho installato dal repository proftpd-mysql visto che questo server ftp permette l'autenticazione basandosi su un DB MySQL. A tale scopo ho creato un nuovo Database denominato proftpd in cui è presente l'unica tabella denominata users. La struttura di tale tabella è la seguente: UserId,Passwd,UID,GID,homedir,shell ed in essa è presente un solo utente rappresentato dai seguenti campi:
    utente1 'sua password cifrata' 501, 65534, /home/ftp/, /bin/false

    Dopo aver creato il database ho configurato il file /etc/proftpd/proftpd.conf nel seguente modo

    Codice:
    #
    # /etc/proftpd/proftpd.conf -- This is a basic ProFTPD configuration file.
    # To really apply changes reload proftpd after modifications.
    # 
    
    # Includes DSO modules
    Include /etc/proftpd/modules.conf
    
    # Set off to disable IPv6 support which is annoying on IPv4 only boxes.
    UseIPv6                off
    
    ServerName            "FreddoServer"
    ServerType            standalone
    #ServerType            inetd
    DeferWelcome            off
    
    MultilineRFC2228        on
    DefaultServer            on
    ShowSymlinks            on
    
    TimeoutNoTransfer        600
    TimeoutStalled            600
    TimeoutIdle            1200
    
    DisplayLogin                    welcome.msg
    DisplayFirstChdir               .message
    ListOptions                    "-l"
    
    DenyFilter            \*.*/
    
    # Use this to jail all users in their homes 
    DefaultRoot            ~
    
    # Users require a valid shell listed in /etc/shells to login.
    # Use this directive to release that constrain.
    # RequireValidShell        off
    
    # Port 21 is the standard FTP port.
    Port                21
    
    # In some cases you have to specify passive ports range to by-pass
    # firewall limitations. Ephemeral ports can be used for that, but
    # feel free to use a more narrow range.
    # PassivePorts                  49152 65534
    
    # 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        1.2.3.4
    
    # 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
    
    # Uncomment this if you are using NIS or LDAP to retrieve passwords:
    # PersistentPasswd        off
    
    # 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
    
    # 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.
    #
    #<IfModule mod_sql.c>
    # SQLBackend            mysql
    #</IfModule>
    
    TransferLog /var/log/proftpd/xferlog
    SystemLog   /var/log/proftpd/proftpd.log
    
    <IfModule mod_tls.c>
    TLSEngine off
    </IfModule>
    
    <IfModule mod_quota.c>
    QuotaEngine on
    </IfModule>
    
    <IfModule mod_ratio.c>
    Ratios on
    </IfModule>
    
    
    # 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. 
    <IfModule mod_delay.c>
    DelayEngine on
    </IfModule>
    
    <IfModule mod_ctrls.c>
    ControlsEngine        on
    ControlsMaxClients    2
    ControlsLog           /var/log/proftpd/controls.log
    ControlsInterval      5
    ControlsSocket        /var/run/proftpd/proftpd.sock
    </IfModule>
    
    <IfModule mod_ctrls_admin.c>
    AdminControlsEngine on
    </IfModule>
    
    # 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 WRITE>
    #       DenyAll
    #     </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                022  022
    #   #            <Limit READ WRITE>
    #   #            DenyAll
    #   #            </Limit>
    #   #            <Limit STOR>
    #   #            AllowAll
    #   #            </Limit>
    #   # </Directory>
    # 
    # </Anonymous>
    
    SQLAuthenticate     on
    SQLUserInfo         proftpd userid passwd NULL NULL homedir shell
    SQLAuthTypes        Crypt Backend Plaintext
    SQLConnectInfo      proftpd@localhost:3306 proftpd ax901pb
    #SQLUserWhereClause  "LoginAllowed = 'Y'"
    SQLDefaultGID       106
    SQLDefaultUID       65534
    #SQLLog PASS updatelogin
    #SQLNamedQuery updatelogin UPDATE "count=count+1 WHERE username='%u'" ftpusers
    
    TransferLog /var/log/xfer/xferlog
    DefaultRoot ~
    # Normally, we want files to be overwriteable.
    <Directory /*>
    AllowOverwrite on
    </Directory>
    Se tento di instaurare una connessione, sia sul server stesso (ftp localhost) che da un altro host della rete ottengo il seguente errore:


    Connected to freddoserv.
    421 Service not available, remote server has closed connection


    Qualcuno sa dirmi dove sbaglio?



  2. #2
    /etc/init.d/brain restart L'avatar di Luca
    Data Registrazione
    Feb 2006
    Località
    Bellaria
    Messaggi
    3,271

    Re: Proftpd con mysql su Ubuntu

    da un rapido search ho trovato questo:

    http://www.unixguide.net/linux/faq/09.25.shtml

    sicuramente qualcuno più esperto di me ti risponderà...

    Benvenuto su HT

  3. #3
    Utente Moderatore L'avatar di Rebel
    Data Registrazione
    Feb 2006
    Località
    London
    Messaggi
    1,655

    Re: Proftpd con mysql su Ubuntu

    Controlla i log.

    in particolare aggiungi questa direttiva alla tua conf:

    http://www.proftpd.org/docs/directiv...QLLogFile.html

    cosi puoi vedere che succede a livello di query mysql
    FlareVM.it: Server Virtuali Xen Linux e Windows 512MB RAM partire da 8.49€!
    Piani cPanel Managed a partire da 29.99€. VPS ISPConfig3 e TurnKey pronte all'uso.
    Twitter: http://twitter.com/flarevm

Discussioni Simili

  1. Ubuntu e Ubuntu Server: le uniche versioni che troverete in futuro
    Di Redazione HostingTalk nel forum Articoli e news su Webhosting e Servizi Internet
    Risposte: 0
    Ultimo Messaggio: 11-03-2011, 10:21
  2. Ubuntu + Webmin + ProFTPd
    Di biox88 nel forum Gestione Server Windows e Server Linux
    Risposte: 1
    Ultimo Messaggio: 04-05-2010, 11:15
  3. Il CEO di MySQL lascia per entrare a far parte di Eucalyptus, la cloud di Ubuntu
    Di Redazione HostingTalk nel forum Articoli e news su Webhosting e Servizi Internet
    Risposte: 0
    Ultimo Messaggio: 22-03-2010, 06:00
  4. Proftpd
    Di framacomputer nel forum Gestione Server Windows e Server Linux
    Risposte: 13
    Ultimo Messaggio: 24-09-2008, 22:41
  5. Problema proftpd
    Di Luca nel forum Gestione Server Windows e Server Linux
    Risposte: 3
    Ultimo Messaggio: 15-05-2007, 18:25

Informazioni Discussione

Utenti che Stanno Visualizzando Questa Discussione

Ci sono attualmente 1 utenti che stanno visualizzando questa discussione. (0 utenti e 1 ospiti)

Tag per Questa Discussione

Segnalibri

Permessi di Scrittura

  • Tu non puoi inviare nuove discussioni
  • Tu non puoi inviare risposte
  • Tu non puoi inviare allegati
  • Tu non puoi modificare i tuoi messaggi
  •