pure-ftpd-mysql with multiple ports

Discussion in 'Installation/Configuration' started by spanish, Aug 6, 2015.

  1. spanish

    spanish Member HowtoForge Supporter

  2. florian030

    florian030 Well-Known Member HowtoForge Supporter

    echo IP,PORT > /etc/pure-ftpd/conf/Bind ?
    restart pureftpd and check the port with netstat
     
  3. spanish

    spanish Member HowtoForge Supporter

    Thanks, Florian.
    This doesn't work.
    \ ;-(
    Another idea?
    Regards,
    Manuel
     
  4. florian030

    florian030 Well-Known Member HowtoForge Supporter

    This depends on your setup. If you installed your server according to one of the peferct-setups and if you run
    Code:
    echo "0.0.0.0,300" > /etc/pure-ftpd/conf/Bind
    pureftpd listens on port 300 after a restart.

    BTW: you can´t bind one pureftpd to more than one port. But your link changes also one the port and did not add another port.
     
  5. spanish

    spanish Member HowtoForge Supporter

    Thanks, Florian.
    I installed ISPConfig many years ago following https://www.howtoforge.com/perfect-server-debian-lenny-ispconfig3
    And I changed the FTP port the first day with: echo "mycustomFTPport" > /etc/pure-ftpd/conf/Bind
    Now, I need that FTP listen to two ports.
    According to http://seoroot.com/blog/computing/s...ind-pure-ftp-to-listen-to-multiple-ports.html this is posible with pure-ftpd, but with a different installation (/etc/pure-ftpd.conf & /etc/rc.d/init.d/pure-ftpd).
    1. Can I do the same with my installation? (for example, cloning /etc/pure-ftpd/conf/Bind and /etc/init.d/pure-ftpd-mysql).
    2. Can I change my installation (/etc/pure-ftpd/conf/Bind & /etc/init.d/pure-ftpd-mysql) to this other (/etc/pure-ftpd.conf & /etc/rc.d/init.d/pure-ftpd)? Is recommendable for ISPConfig 3?
    3. Can I install other FTP server (vsftpd) beside pure-ftpd-mysql and listen to other port? Is recommendable for ISPConfig 3?
    Thank you for your help!
    Regards,
    Manuel
     
  6. florian030

    florian030 Well-Known Member HowtoForge Supporter

    I think they use two pureftpds (as i wrote above, you can´t bind one pure--ftpd instance to two ports) with different configs and different startup-scripts.
    To do this, you have to copy and adjust the init-script /etc/init.d/pure-ftpd-mysql and the wrapper-script /usr/sbin/pure-ftpd-wrapper. As long as you use the same sql-configs this should work with ispconfig.
    You can install a 2nd ftp-server. But ispconfig does not supper vsftpd so you must create / update users by yourself.
     
  7. spanish

    spanish Member HowtoForge Supporter

    Thanks, Florian. I will test the first option (copy&adjust scripts) and report here. Regards, Manuel
     
  8. spanish

    spanish Member HowtoForge Supporter

    Hello again,
    I tried this (the sample extra port is 1234):
    # cp /etc/init.d/pure-ftpd-mysql /etc/init.d/pure-ftpd-mysql-1234
    # vi /etc/init.d/pure-ftpd-mysql-1234
    WRAPPER=/usr/sbin/pure-ftpd-wrapper-1234
    PIDFILE=/var/run/pure-ftpd/pure-ftpd-1234.pid
    # cp /usr/sbin/pure-ftpd-wrapper /usr/sbin/pure-ftpd-wrapper-1234
    # vi /usr/sbin/pure-ftpd-wrapper-1234
    'Bind' => ['-S 1234', \&parse_string],
    But this doesn't work:
    # /etc/init.d/pure-ftpd-mysql-1234 start
    \ ;-(
    What else should I do?
    Thank you for your help!
    Regards,
    Manuel
     
  9. florian030

    florian030 Well-Known Member HowtoForge Supporter

    Did you define a new etcconf in the new wrappe?
    Try to start pureftpd wih bash -x /etc/init.d/pure-ftpd-mysql-1234 start
     
  10. spanish

    spanish Member HowtoForge Supporter

    Thanks, Florian,

    New etcconf defined in the new wrapper:
    # cp -ar /etc/pure-ftpd/conf /etc/pure-ftpd/conf-1234
    # vi /etc/pure-ftpd/conf-1234/Bind
    1234
    # vi /usr/sbin/pure-ftpd-wrapper-1234
    'Bind' => ['-S %s', \&parse_string],
    opendir (ETCCONF, '/etc/pure-ftpd/conf-1234')
    || die "$0: Couldn't examine directory /etc/pure-ftpd/conf-1234: $!\n";
    # /etc/init.d/pure-ftpd-mysql-1234 start
    # netstat -tan | grep \:1234
    None \ ;-(

    # bash -x /etc/init.d/pure-ftpd-mysql-1234 start
    Code:
    + PATH=/sbin:/bin:/usr/sbin:/usr/bin
    + NAME=pure-ftpd
    + DESC='ftp server'
    + : --quiet
    + UPLOADDAEMON=/usr/sbin/pure-uploadscript
    + UDNAME=pure-uploadscript
    + UDDESC='ftp upload handler'
    + WRAPPER=/usr/sbin/pure-ftpd-wrapper-1234
    + . /lib/lsb/init-functions
    ++ FANCYTTY=
    ++ '[' -e /etc/lsb-base-logging.sh ']'
    ++ true
    + PIDFILE=/var/run/pure-ftpd/pure-ftpd-1234.pid
    + '[' -h /etc/init.d/pure-ftpd-mysql-1234 ']'
    + ME=/etc/init.d/pure-ftpd-mysql-1234
    ++ basename /etc/init.d/pure-ftpd-mysql-1234
    ++ sed -ne 's/^pure-ftpd-\(.*\)/\1/p'
    + SUFFIX=mysql-1234
    + '[' mysql-1234 ']'
    + DAEMON=/usr/sbin/pure-ftpd-mysql-1234
    + export STANDALONE_OR_INETD=inetd
    + STANDALONE_OR_INETD=inetd
    + export VIRTUALCHROOT=
    + VIRTUALCHROOT=
    + test -r /etc/default/pure-ftpd-common
    + . /etc/default/pure-ftpd-common
    ++ STANDALONE_OR_INETD=standalone
    ++ VIRTUALCHROOT=true
    ++ UPLOADSCRIPT=
    ++ UPLOADUID=
    ++ UPLOADGID=
    + '[' true = true ']'
    + '[' mysql-1234 ']'
    + SUFFIX=mysql-1234-virtualchroot
    + test -x /usr/sbin/pure-ftpd-mysql-1234
    + exit 0
    Thank you for your help!
    Regards,
    Manuel
     
  11. spanish

    spanish Member HowtoForge Supporter

    Hello again,
    I don't know if this is significant:
    # insserv pure-ftpd-mysql-1234
    insserv: warning: script is corrupt or invalid: /etc/init.d/../rc6.d/K00vzreboot
    # vi /etc/rc6.d/K00vzreboot
    Code:
    #!/bin/bash
    >/reboot
    Regards,
    Manuel
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    this error is ok and not relevant for ftp.
     
  13. spanish

    spanish Member HowtoForge Supporter

    Thanks, Till. I will continue searching information about this. Regards, Manuel
     
  14. spanish

    spanish Member HowtoForge Supporter

    So far, I have not managed this, but install a second FTP server (proftpd).
    So thank you very much for your help and cordial greetings,
    Manuel
     

Share This Page