Bug#721201: proftpd-basic: Without sleep 2, doing /etc/init.d/proftpd restart doesn't restart the daemon, but only stops it.

Prisma Computer - G. Fischer g.fischer at prisma-computer.de
Mon Apr 7 10:33:01 UTC 2014


Hello,

I'm able to confirm this bug with ProFTPD Version 1.3.5rc3. This is an
evil bug, leading to logrotate is killing proftpd. When is it expected
to be fixed?

Mit freundlichen Grüßen / Best regards

Gregor Fischer

Prisma Computer GmbH
Sternallee 89  -  68723 Schwetzingen
Fon 0 62 02.5 75 68 10
Fax 0 62 02.5 75 68 75
eMail: g.fischer at prisma-computer.de
Internet: www.prisma-computer.de

Geschäftsführung: Gerald Wilkens, Bernhard Goebel
Amtsgericht Mannheim HRB 420986 S
USt-IdNr.: DE 144 278 153

Am 29.08.2013 02:01, schrieb Virgil Gheorghiu:
> Package: proftpd-basic
> Version: 1.3.5~rc3-2
> Severity: important
> 
> Dear Maintainer,
> *** Please consider answering these questions, where appropriate ***
> 
>    * What led up to the situation?
>    * What exactly did you do (or not do) that was effective (or
>      ineffective)?
>    * What was the outcome of this action?
>    * What outcome did you expect instead?
> 
> *** End of the template - remove these lines ***
> 
> 
> -- System Information:
> Debian Release: 7.0
>   APT prefers unstable
>   APT policy: (500, 'unstable')
> Architecture: amd64 (x86_64)
> 
> Kernel: Linux 2.6.32-5-amd64 (SMP w/4 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+nmu3
> ii  debconf            1.5.49
> ii  debianutils        4.3.4
> ii  libacl1            2.2.51-8
> ii  libc6              2.17-92
> ii  libcap2            1:2.22-1.2
> ii  libmemcached10     1.0.8-1
> ii  libmemcachedutil2  1.0.8-1
> ii  libncurses5        5.9-10
> ii  libpam-runtime     1.1.3-7.1
> ii  libpam0g           1.1.3-7.1
> ii  libpcre3           1:8.31-2
> ii  libssl1.0.0        1.0.1e-1
> ii  libtinfo5          5.9-10
> ii  libwrap0           7.6.q-24
> ii  netbase            5.0
> ii  sed                4.2.1-10
> ii  ucf                3.0025+nmu3
> ii  zlib1g             1:1.2.7.dfsg-13
> 
> proftpd-basic recommends no packages.
> 
> Versions of packages proftpd-basic suggests:
> pn  openbsd-inetd | inet-superserver  <none>
> ii  openssl                           1.0.1c-4
> pn  proftpd-doc                       <none>
> pn  proftpd-mod-geoip                 <none>
> ii  proftpd-mod-ldap                  1.3.5~rc3-2
> pn  proftpd-mod-mysql                 <none>
> pn  proftpd-mod-odbc                  <none>
> pn  proftpd-mod-pgsql                 <none>
> pn  proftpd-mod-sqlite                <none>
> 
> -- Configuration Files:
> /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/(in\.)?proftpd" /etc/xinetd.conf 2>/dev/null || \
> 	   egrep -qi "server[[:space:]]*=[[:space:]]*/usr/sbin/(in\.)?proftpd" /etc/xinetd.d/* 2>/dev/null || \
> 	   egrep -qi "^ftp.*/usr/sbin/(in\.)?proftpd" /etc/inetd.d/* 2>/dev/null || \
> 	   egrep -qi "^ftp.*/usr/sbin/(in\.)?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 -a \
> 	     ! -x /usr/sbin/inetutils-inetd ]; 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" --retry=TERM/10/KILL/5
>     		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
> 
> 
> -- debconf information:
> * shared/proftpd/inetd_or_standalone: standalone
> 



More information about the Pkg-proftpd-maintainers mailing list