Bug#657484: proftpd-basic: After upgrade to 1.3.4a-1 cannot connect to proftpd started with xinetd

J G Miller miller at yoyo.ORG
Thu Jan 26 15:05:24 UTC 2012


Package: proftpd-basic
Version: 1.3.4a-1
Severity: normal

After upgrading to 1.3.4a-1, it is no longer possible to make a
connection to proftpd started by xinetd.

Instead of giving the connection message and the username prompt,
this happens

  Connected to ocelot
  ocelot proftpd[18520]: using PCRE 8.12 2011-01-15
  ftp> dir
  Not connected.
  ftp>

The proftpd log file reports

   mod_cap/1.1: adding CAP_AUDIT_WRITE capability
   FTP session opened.
   Login timeout exceeded, disconnected
   Session timed out, disconnected
   FTP session closed.

Downgrading back to 1.3.3a-6squeeze4 and all works normally via xinetd.

  Connected to ocelot.
  220 ProFTPD 1.3.3a Server (ocelot) [192.168.11.17]
  Name (ocelot:miller):

This problem is present both on the i386 and amd64 architectures.

So why does running proftpd via xinetd no longer work for
version 1.3.4a-1?


-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 3.1.0-1-686-pae (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages proftpd-basic depends on:
ii  adduser         3.113
ii  debconf         1.5.41
ii  debianutils     4.1
ii  libacl1         2.2.51-5
ii  libc6           2.13-24
ii  libcap2         1:2.22-1
ii  libncurses5     5.9-4
ii  libpam-runtime  1.1.3-6
ii  libpam0g        1.1.3-6
ii  libpcre3        8.12-4
ii  libssl1.0.0     1.0.0g-1
ii  libtinfo5       5.9-4
ii  libwrap0        7.6.q-22
ii  netbase         4.47
ii  sed             4.2.1-9
ii  ucf             3.0025+nmu2
ii  update-inetd    4.41
ii  zlib1g          1:1.2.3.4.dfsg-3

proftpd-basic recommends no packages.

Versions of packages proftpd-basic suggests:
ii  openssl                    1.0.0g-1
ii  proftpd-doc                1.3.4a-1
ii  proftpd-mod-ldap           1.3.4a-1
ii  proftpd-mod-mysql          <none>
ii  proftpd-mod-odbc           <none>
ii  proftpd-mod-pgsql          <none>
ii  proftpd-mod-sqlite         <none>
ii  xinetd [inet-superserver]  1:2.3.14-7

-- Configuration Files:
/etc/default/proftpd changed:
OPTIONS="-d9"
RUN="xinetd"


/etc/init.d/proftpd changed:
PATH=/bin:/usr/bin:/sbin:/usr/sbin
DAEMON=/usr/sbin/proftpd
NAME=proftpd
RUN="no"
OPTIONS=""
CONFIG_FILE=/etc/proftpd/proftpd.conf
PIDFILE=`grep -i 'pidfile' $CONFIG_FILE|sed -e 's/pidfile[\t ]\+//i'`
if [ "x$PIDFILE" = "x" ];
then
	PIDFILE=/var/run/proftpd.pid
fi
[ -r /etc/default/proftpd ] && . /etc/default/proftpd
trap "" 1
trap "" 15
test -f $DAEMON || exit 0
. /lib/lsb/init-functions
if ! egrep -qi "^[[:space:]]*ServerType.*standalone" $CONFIG_FILE
then
	if egrep -qi "server[[:space:]]*=[[:space:]]*/usr/sbin/proftpd" /etc/xinetd.conf 2>/dev/null || \
	   egrep -qi "server[(_args)]*[[:space:]]*=[[:space:]]*/usr/sbin/proftpd" /etc/xinetd.d/* 2>/dev/null || \
       egrep -qi "^ftp.*/usr/sbin/proftpd" /etc/inetd.conf 2>/dev/null
	then
    		RUN="no"
    		INETD="yes"
	else
		if ! egrep -qi "^[[:space:]]*ServerType.*inetd" $CONFIG_FILE
		then
    		RUN="yes"
			INETD="no"
		else
			RUN="no"
			INETD="no"
		fi
	fi
fi
[ ! -d /var/run/proftpd ] && mkdir /var/run/proftpd
inetd_check()
{
	if [ ! -x /usr/sbin/inetd -a ! -x /usr/sbin/xinetd ]; then
		echo "Neither inetd nor xinetd appears installed: check your configuration."
	fi
}
start()
{
    log_daemon_msg "Starting ftp server" "$NAME"
    start-stop-daemon --start --quiet --pidfile "$PIDFILE" --oknodo --exec $DAEMON -- -c $CONFIG_FILE $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."
		inetd_check
	    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)."
		inetd_check
	fi
	start
	;;

    stop)
	if [ "x$RUN" = "xyes" ] ; then
	    signal stop 0
	else
	    if [ "x$INETD" = "xyes" ] ; then
		echo "ProFTPD is started from inetd/xinetd."
		inetd_check
	    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)."
		inetd_check
	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."
		inetd_check
	    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."
		inetd_check
		exit 0
	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."
			exit 0
	    else
	    	echo "ProFTPD is started in standalone mode, currently not running."
			exit 3
	    fi
	fi
	;;
    check-config)
        $DAEMON -t >/dev/null && echo "ProFTPD configuration OK" && exit 0
        exit 1
        ;;
    *)
	echo "Usage: /etc/init.d/$NAME {start|status|force-start|stop|force-stop|reload|restart|force-reload|check-config}"
	exit 1
	;;
esac
exit 0

/etc/xinetd.d/proftpd:

#*****************************************************************************1#
#|
#|  file : /etc/xinetd.d/proftpd
#|
#*---------------------------------------------------------------------------*#
#
#  description : The proftpd server provides FTP service.
#
#.............................................................................#
#
service	ftp
{
	bind		 =  192.168.11.17
	disable		 =  no
	flags		 =  NAMEINARGS REUSE
	log_on_failure	+=  USERID
	log_on_success	+=  DURATION USERID
	nice		 =  10
	port		 =  21
	protocol	 =  tcp
	server		 =  /usr/sbin/tcpd
	server_args	 =  /usr/sbin/proftpd -d3
	socket_type	 =  stream
	user		 =  root
	wait		 =  no
}
#
#*****************************************************************************#

-- debconf information:
* shared/proftpd/inetd_or_standalone: standalone





More information about the Pkg-proftpd-maintainers mailing list