Zum Inhalt springen

Plesk psa proftpd 1.3.1 GnuTLS error -9: A TLS packet …

    Hallo,

    sollte noch jemand Ubuntu 8.04 mit Plesk 9.2 (oder 9.3) und psa-proftpd 1.3.1 in Verwendung haben und damit Probleme mit FTPES ( FTP TLS auf Port 21), dem kann mit einem Update von proftpd geholfen werden.

    Hier beschreibe ich meinen Lösungsweg. 1:1 Durchführung auf eigene Gefahr.
    Mein Server ist ein vserver bei Hosteurope.

    psa-proftpd und psa-proftpd-inetd habe ich nicht deinstalliert.
    Befehle als root ausgeführt.

    1. cd /tmp
    2. mkdir proftpd
    3. cd proftpd
    4. wget ftp://ftp.proftpd.org/distrib/source/proftpd-1.3.3rc3.tar.gz
    5. tar -xvf proftpd-1.3.3rc3.tar.gz
    6. cd proftpd-1.3.3rc3
    7. apt-get install build-essential libssl-dev
    8. ./configure –prefix=/usr –sysconfdir=/etc –localstatedir=/var/run  –with-modules=mod_tls
    9. make
    10. make install
    11. cd /etc
    12. vi proftpd.conf
    13. Folgende Zeilen geändert:
      [code]ServerType                      standalone
      #ServerType                     inetd
      #AuthPAM on
      #AuthPAMConfig proftpd[/code]
    14. vi xinetd.d/ftp_psa   > folgende Zeile ändern
      [code]disable         = yes[/code]
    15. cd init.d
    16. vi proftpd
    17. Code einfügen
      [code]#!/bin/sh

      ### BEGIN INIT INFO
      # Provides:          proftpd
      # Required-Start:    $syslog $local_fs $network
      # Required-Stop:     $syslog $local_fs $network
      # Should-Start:      $remote_fs $named
      # Should-Stop:       $remote_fs $named
      # Default-Start:     2 3 4 5
      # Default-Stop:      0 1 6
      # Short-Description: Starts ProFTPD daemon
      # Description:       This script runs the FTP service offered
      #                    by the ProFTPD daemon
      ### END INIT INFO

      # Start the proftpd FTP daemon.

      PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin
      DAEMON=/usr/sbin/proftpd
      NAME=proftpd

      # Defaults
      RUN=“no“
      OPTIONS=“ -c /etc/proftpd.conf“

      PIDFILE=`grep -i ‚pidfile‘ /etc/proftpd.conf | sed -e ’s/pidfile[\t ]\+//i’`
      if [ „x$PIDFILE“ = „x“ ];
      then
      PIDFILE=/var/run/proftpd.pid
      fi

      # Read config (will override defaults)
      [ -r /etc/default/proftpd ] && . /etc/default/proftpd

      trap „“ 1
      trap „“ 15

      test -f $DAEMON || exit 0

      . /lib/lsb/init-functions

      #
      # Servertype could be inetd|standalone|none.
      # In all cases check against inetd and xinetd support.
      #
      if ! egrep -qi „^[[:space:]]*ServerType.*standalone“ /etc/proftpd.conf
      then
      if [ $(dpkg-divert –list xinetd|wc -l) -eq 1 ]
      then
      if egrep -qi „server[[:space:]]*=[[:space:]]*/usr/sbin/proftpd“ /etc/xinetd.conf 2>/dev/null || \
      egrep -qi „server[[:space:]]*=[[:space:]]*/usr/sbin/proftpd“ /etc/xinetd.d/* 2>/dev/null
      then
      RUN=“no“
      INETD=“yes“
      else
      if ! egrep -qi „^[[:space:]]*ServerType.*inetd“ /etc/proftpd.conf
      then
      RUN=“yes“
      INETD=“no“
      else
      RUN=“no“
      INETD=“no“
      fi
      fi
      else
      if egrep -qi „^ftp.*/usr/sbin/proftpd“ /etc/inetd.conf 2>/dev/null
      then
      RUN=“no“
      INETD=“yes“
      else
      if ! egrep -qi „^[[:space:]]*ServerType.*inetd“ /etc/proftpd.conf
      then
      RUN=“yes“
      INETD=“no“
      else
      RUN=“no“
      INETD=“no“
      fi
      fi
      fi
      fi

      RUN=“yes“
      INETD=“no“

      # /var/run could be on a tmpfs

      [ ! -d /var/run/proftpd ] && mkdir /var/run/proftpd

      start()
      {
      log_daemon_msg „Starting ftp server“ „$NAME“

      start-stop-daemon –start –quiet –pidfile „$PIDFILE“ –oknodo –exec $DAEMON — $OPTIONS
      if [ $? != 0 ]; then
      log_end_msg 1
      exit 1
      else
      log_end_msg 0
      fi
      }

      signal()
      {

      if [ „$1“ = „stop“ ]; then
      SIGNAL=“TERM“
      log_daemon_msg „Stopping ftp server“ „$NAME“
      else
      if [ „$1“ = „reload“ ]; then
      SIGNAL=“HUP“
      log_daemon_msg „Reloading ftp server“ „$NAME“
      else
      echo „ERR: wrong parameter given to signal()“
      exit 1
      fi
      fi
      if [ -f „$PIDFILE“ ]; then
      start-stop-daemon –stop –signal $SIGNAL –quiet –pidfile „$PIDFILE“
      if [ $? = 0 ]; then
      log_end_msg 0
      else
      SIGNAL=“KILL“
      start-stop-daemon –stop –signal $SIGNAL –quiet –pidfile „$PIDFILE“
      if [ $? != 0 ]; then
      log_end_msg 1
      [ $2 != 0 ] || exit 0
      else
      log_end_msg 0
      fi
      fi
      if [ „$SIGNAL“ = „KILL“ ]; then
      rm -f „$PIDFILE“
      fi
      else
      log_end_msg 0
      fi
      }

      case „$1“ in
      start)
      if [ „x$RUN“ = „xyes“ ] ; then
      start
      else
      if [ „x$INETD“ = „xyes“ ] ; then
      echo „ProFTPd is started from inetd/xinetd.“
      else
      echo „ProFTPd warning: cannot start neither in standalone nor in inetd/xinetd mode. Check your configuration.“
      fi
      fi
      ;;

      force-start)
      if [ „x$INETD“ = „xyes“ ] ; then
      echo „Warning: ProFTPd is started from inetd/xinetd (trying to start anyway).“
      fi
      start
      ;;
      stop)
      if [ „x$RUN“ = „xyes“ ] ; then
      signal stop 0
      else
      if [ „x$INETD“ = „xyes“ ] ; then
      echo „ProFTPd is started from inetd/xinetd.“
      else
      echo „ProFTPd warning: cannot start neither in standalone nor in inetd/xinetd mode. Check your configuration.“
      fi
      fi
      ;;

      force-stop)
      if [ „x$INETD“ = „xyes“ ] ; then
      echo „Warning: ProFTPd is started from inetd/xinetd (trying to kill anyway).“
      fi
      signal stop 0
      ;;

      reload)
      signal reload 0
      ;;

      force-reload|restart)
      if [ „x$RUN“ = „xyes“ ] ; then
      signal stop 1
      sleep 2
      start
      else
      if [ „x$INETD“ = „xyes“ ] ; then
      echo „ProFTPd is started from inetd/xinetd.“
      else
      echo „ProFTPd warning: cannot start neither in standalone nor in inetd/xinetd mode. Check your configuration.“
      fi
      fi
      ;;

      status)
      if [ „x$INETD“ = „xyes“ ] ; then
      echo „ProFTPd is started from inetd/xinetd.“
      else
      if [ -f „$PIDFILE“ ]; then
      pid=$(cat $PIDFILE)
      else
      pid=“x“
      fi
      if [ `pidof proftpd|grep „$pid“|wc -l` -ne 0 ] ; then
      echo „ProFTPd is started in standalone mode, currently running.“
      else
      echo „ProFTPd is started in standalone mode, currently not running.“
      fi
      fi
      ;;
      *)
      echo „Usage: /etc/init.d/$NAME {start|status|force-start|stop|force-stop|reload|restart|force-reload}“
      exit 1
      ;;
      esac

      exit 0[/code]

    18. chmod 755 proftpd
    19. /etc/init.d/proftpd start
    20. /etc/init.d/proftpd stop
    21. /etc/init.d/proftpd restart

    Fertig.

    Jetzt sollte proftpd 1.3.3rc3 (oder welche sie auch genutzt haben) laufen und FTP mit TLS (FTPES) auch funktionieren.

    Christian

     

    Schreibe einen Kommentar

    Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert