DirectAdmin Service Moniter Cannot Stop ProFTPD

topdog

Verified User
Joined
Jun 22, 2009
Messages
135
Hi,
I'm on DA 1.33.7 and CentOS5.3.
When I go to the DA service moniter, and attempt stopping proftpd by clicking on the stop link by it's name it still shows as being up and not stopped.
The configuration by default is a stand-alone server. Even doing from the shell a command line of:
service proftpd stop
Yealds the error:
Stopping ProFTPD: Failed.
Yet I can do from the command line the command:
service prroftpd start
And get the message:
Starting ProFTPD .. ok.
Anyone seen this behavior before? And if so, how can it be fixed? Or do I need not worry?
 
You should check this file: /etc/rc.d/iit.d/proftpd; it's the file called by the service command.

Check to see what it does when you call stop.

Then try those steps, manually, from the command line to see what's happening.

Jeff
 
You should check this file: /etc/rc.d/iit.d/proftpd; it's the file called by the service command.

Check to see what it does when you call stop.

Then try those steps, manually, from the command line to see what's happening.

Jeff
I looked at the file in a text editor itself and cannot figure out what could be wrong. However, doing from commandline:
/etc/rc.d/init.d/proftpd restart yealds the error: Shutting down proftpd .. failed.
Same with the prefix shutdown.
I have the content of the /etc/rc.d/init.d/proftpd file. Maybe something needs to be changed perhaps?
File Content

#!/bin/sh
#
# Startup script for ProFTPD
#
# chkconfig: 345 85 15
# description: ProFTPD is an enhanced FTP server with \
# a focus toward simplicity, security, and ease of configuration. \
# It features a very Apache-like configuration syntax, \
# and a highly customizable server infrastructure, \
# including support for multiple 'virtual' FTP servers, \
# anonymous FTP, and permission-based directory visibility.
# processname: proftpd
# config: /etc/proftpd.conf
#
# By: Osman Elliyasa <[email protected]>
# $Id: proftpd.init.d,v 1.7 2002/12/07 21:50:27 jwm Exp $

# Source function library.
. /etc/rc.d/init.d/functions

if [ -f /etc/sysconfig/proftpd ]; then
. /etc/sysconfig/proftpd
fi

PATH="$PATH:/usr/local/sbin"

# See how we were called.
case "$1" in
start)
echo -n "Starting proftpd: "
daemon proftpd $OPTIONS
echo
touch /var/lock/subsys/proftpd
;;
stop)
echo -n "Shutting down proftpd: "
killproc proftpd
echo
rm -f /var/lock/subsys/proftpd
;;
status)
status proftpd
;;
restart)
$0 stop
$0 start
;;
reread)
echo -n "Re-reading proftpd config: "
killproc proftpd -HUP
echo
;;
suspend)
hash ftpshut >/dev/null 2>&1
if [ $? = 0 ]; then
if [ $# -gt 1 ]; then
shift
echo -n "Suspending with '$*' "
ftpshut $*
else
echo -n "Suspending NOW "
ftpshut now "Maintanance in progress"
fi
else
echo -n "No way to suspend "
fi
echo
;;
resume)
if [ -f /etc/shutmsg ]; then
echo -n "Allowing sessions again "
rm -f /etc/shutmsg
else
echo -n "Was not suspended "
fi
echo
;;
*)
echo -n "Usage: $0 {start|stop|restart|status|reread|resume"
hash ftpshut
if [ $? = 1 ]; then
echo '}'
else
echo '|suspend}'
echo 'suspend accepts additional arguments which are passed to ftpshut(8)'
fi
exit 1
esac

if [ $# -gt 1 ]; then
shift
$0 $*
fi

exit 0
I actually just remembered, there's a path variable that says /usr/local/sbin in that file. that /usr/local/sbin is empty. Do you think that could be the problem, that the path is pointing to a directory that is empty?
 
It could be that your script isn't pointing to the real location of proftpd; find out where it is, and change the script.

Jeff
 
It could be that your script isn't pointing to the real location of proftpd; find out where it is, and change the script.

Jeff
The only thing I can find is /usr/sbin/proftpd.
I cannot restart proftpd via that option, however. doing /usr/sbin/proftpd restart gives:
- unknown parameter: 'restart'. So I can't figure out how proftpd is even suppose to be restarted, stopped, or shutdown if /usr/sbin/proftpd isn't the correct way for handling the ProFTPD service.
 
Last edited:
Just a question then. Do you think that reinstalling ProFTPD may also fix this issue?
And if so I can follow the instructions in the directadmin knowledge base to reinstall ProFTPD?
 
/usr/sbin/proftpd isn't a startup script, it's the actual daemon. The daemon doesn't take restart as a parameter. The startup scripts take that parameter; you know where they are.

If your startup script isn't properly controlling ProFTPd perhaps you should try the reinstall using instructions found on the DirectAdmin site.

Jeff
 
/usr/sbin/proftpd isn't a startup script, it's the actual daemon. The daemon doesn't take restart as a parameter. The startup scripts take that parameter; you know where they are.

If your startup script isn't properly controlling ProFTPd perhaps you should try the reinstall using instructions found on the DirectAdmin site.

Jeff
How would I remove proftpd? And would I have to also remove the proFTPD RPMS?
 
Use custombuild. It'll do all that needs to be done.
Jeff
Tried using custombuild with the ./build proftpd command, and while it upgraded the source it left the old version of proftpd rpm files behind. The source, for instance, was 1.3.2A, the RPM's were reporting 1.3.11 after custombuild downloaded the new ProFTPD source.
In order to upgrade the RPM's, I had to build the source 1.3.2A ProFTPD RPM's then do rpm -Uvh proftpd*.rpm, custombuild never bothered to remove the old RPMs and put the new ones in.
 
Sorry, I should have asked you how proFTPd was installed before giving my answer.

Jeff
 
Back
Top