proFTP & pureFTP, can they co-exist or ...

Rainner

Verified User
Joined
Apr 12, 2005
Messages
42
Location
NC
Hi All,

I dont want ot switch DA, its my favorite but my primary software that is mandatory for my business is dependant on pureFTPd.

Option questions:

Is there a way to make them both run and co-exist on my server?

or

If not, can proFTP be removed and replaced with pureFTP? I do understand DA wont support this but that doesn't matter, I need pureFTP to operate my business.

I would be very greatful for any help or direction.

Sincerely

Rainner
 
This should work:
Code:
rpm -e proftpd proftpd-standalone
cd /usr/local/directadmin/customapache
wget http://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.21.tar.gz
tar -xzf pure-ftpd-1.0.21.tar.gz
cd pure-ftpd-1.0.21
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/run --mandir=/usr/local/man --without-pam --with-ratios --with-virtualchroot --with-virtualhosts LDFLAGS=-static
make
make install
cp -Rp /etc/proftpd.passwd /etc/pureftpd.passwd
cd configuration-file
cp pure-ftpd.conf /etc
chmod 755 pure-config.pl
perl -pi -e 's/^ExtAuth/# ExtAuth/' /etc/pure-ftpd.conf
cp -Rp pure-config.pl /usr/sbin/pure-config.pl
./pure-config.pl /etc/pure-ftpd.conf
mkdir /etc/pure-ftpd
perl -pi -e 's#/etc/proftpd.conf#/etc/pure-ftpd.conf#' /usr/local/directadmin/conf/directadmin.conf
perl -pi -e 's#/etc/proftpd.passwd#/etc/pureftpd.passwd#' /usr/local/directadmin/conf/directadmin.conf
 
Last edited:
thank you smtalk for the help. Does the above instructions remove the other or make them both co-exist? Im not real familiar with this and a bit confused. Also I emailed support at DA & John replied

"As long as you use all shared IP addresses for the ftp accounts (no "owned" IP addresses) then pureftpd would be able to read the /etc/proftpd.passwd file, the format is the same.
We couldn't offer support for doing this, but yes, it can be done, you'd just have restrictions for the DA features you could use.

John
"

&

"I've never tested it myself, but smtalk is fairly knowledgable.
You'd also want to swap "proftpd" with "pureftpd" in the /usr/local/directadmin/data/admin/services.status file so DA watches for proftpd.

John"


Any more help would be so appreciated. Do you have yahoo chat? if so I'm at rainner468
 
Yes, it does not support "owned" IP addresses (if user has dedicated IP), but he can login via default IP :) They can not "co-exist" you need to choose - ProFTPd or PureFTPd :)
 
ok I just did all the commands you posted here and seemed to go fine. I'm guessing that proftp is now off and purftp on? and if so, do you think although not support that DA will still function?

Thanks

Rainner
 
ok I just did all the commands you posted here and seemed to go fine. I'm guessing that proftp is now off and purftp on? and if so, do you think although not support that DA will still function?

Thanks

Rainner

Yes, everything should be ok :) And, sure, you're running pureftpd now :)
 
Cool ty :)

Is there a way to verify pureftp is running?

I went into my DirectAdmin and looked at services and it says proftp is still running. So I created a new account with DA and then tested the ftp connection and it worked fine. so Im a bit confused, sorry.
 
Code:
ps auxww | grep ftp

If it's not running, do:
Code:
service proftpd stop

Code:
pureftpd &
 
I did these:

root@slb sbin]# ps auxww | grep ftp
ftp 14203 0.0 0.0 2496 1132 ? Ss Jul11 0:00 proftpd: (accepting connections)

shows it was running.

so I did the next command:

[root@slb sbin]# service proftpd stop
proftpd: unrecognized service

so when I saw the messages, I checked the sbin dir and it was no longer there. Maybe the previous commands we used origianlly took it out?

Well since I chouldn't remove it that way I knew how to use kill on the PID so I did that and now proftpd is not running.

I then tried to start it with the 3rd command:

root@slb sbin]# pureftpd &
[8] 31222
[root@slb sbin]# -bash: pureftpd: command not found

and it cant find it. I recompiled the db and did a :
find pureftpd
find: pureftpd: No such file or directory

Did I miss something?
 
Do:
Code:
killall proftpd
Then open /etc/init.d/pure-ftpd file:
Code:
nano -w /etc/init.d/pure-ftpd
Copy-paste this script content into the file:
Code:
#!/bin/bash
#
# Startup script for the pure-ftpd FTP Server  $Revision: 1.1 $
#
# chkconfig: - 85 15
# description: Pure-FTPd is an FTP server daemon based upon Troll-FTPd
# processname: pure-ftpd
# pidfile: /var/run/pure-ftpd.pid
# config: /etc/pure-ftpd.conf

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

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is configured.
[ ${NETWORKING} = "no" ] && exit 0

RETVAL=0

prog="pure-ftpd"

# Path to the pure-ftp binaries.
fullpath=/usr/sbin/pure-ftpd
pureftpwho=/usr/sbin/pure-ftpwho
pure_config=/etc/pure-ftpd.conf
pure_launch_script=/usr/sbin/pure-config.pl


start() {
        echo -n $"Starting $prog: "
        daemon "$pure_launch_script $pure_config --daemonize > /dev/null"
        RETVAL=$?
        [ $RETVAL = 0 ] && touch /var/lock/subsys/pure-ftpd
        echo
}

stop() {
        echo -n $"Stopping $prog: "
        killproc pure-ftpd
        RETVAL=$?
        [ $RETVAL = 0 ] && rm -f /var/lock/subsys/pure-ftpd
        echo
}

# See how we were called.
case "$1" in
        start)
                start
                ;;
        stop)
                stop
                ;;
        restart)
                stop
                start
                ;;
        reload)
        echo -n $"Reloading $prog: "
                killproc pure-ftpd -HUP
                RETVAL=$?
                echo
                ;;
        condrestart)
                if [ -f /var/lock/subsys/pure-ftpd ] ; then
                        stop
                        # avoid race
                        sleep 3
                        start
                fi
                ;;
        status)
                status pure-ftpd
                RETVAL=$?
                if [ -f $pureftpwho ] && [ $RETVAL -eq 0 ] ; then
                        $pureftpwho
                fi
                ;;
        *)
                echo $"Usage: pure-ftpd {start|stop|restart|reload|condrestart|status}"
                RETVAL=1
esac
exit $RETVAL
And do:
Code:
chmod 755 /etc/init.d/pure-ftpd
Then do:
Code:
service pure-ftpd start
Good luck!
 
Last edited:
Thank youy for all the help you've given me. I jsut got home nad was able to perform the lastest instructions and I get a startup error now:

Starting pure-ftpd: /bin/bash: /usr/sbin/pure-config.pl: No such file or directory
[FAILED]


Should this have been made during the pure-ftp isntallation I ran?

tahnks again

Rainner
 
concerning above mesasge I just left

I did a search and found the missing pure-config.pl file, it was in:

/usr/local/directadmin/customapache/pure-ftpd-1.0.21/configuration-file/pure-config.pl

So I change the script you gave me to reflect that and then it started, is this ok?
 
Yes, it's okay :) You can also do:
Code:
cp -Rp  /usr/local/directadmin/customapache/pure-ftpd-1.0.21/configuration-file/pure-config.pl /usr/sbin/pure-config.pl

And you will have it in right place :)
 
pure-FTDd / mySQL support?

great! I think I'm learning :)

After all this I found out that pure-FTPd that I use needs to have mySQL support. Does this version you helped me with have that ?

Thanks again :)

Rainner
 
It doesn't have mysql support, but you can add it:
Code:
cd /usr/local/directadmin/customapache/pure-ftpd-1.0.21[FONT=monospace]
[/FONT]make clean
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/run --mandir=/usr/local/man --without-pam --with-ratios [SIZE=-1]--with-mysql=/usr[/SIZE] --with-virtualchroot --with-virtualhosts LDFLAGS=-static
make
make install[FONT=monospace]
[/FONT]
You also need to add this to /etc/pureftpd.conf:
Code:
AUTH="-l mysql:/etc/pureftpd-mysql.conf"
And add info to /etc/pureftpd-mysql.conf :)
 
Last edited:
missing pureftpd-mysql.conf file

hi smtalk

thanks again.

I ran all of the code.

then I added manually
AUTH="-l mysql:/etc/pureftpd-mysql.conf" to /etc/pure-ftpd.conf

But I looked for and can't find the file

/etc/pureftpd-mysql.conf to add it there. Should I run the code again?

UPDATE: ok I ran it again and I got this error message, I didnt see the first time:

configure: error: libmysqlclient is needed for MySQL support



Thanks!

Rainner
 
Last edited:
libmysqlclient is needed for MySQL support

Hi smtalk

I guess I wasn't clear, I'm sorry

-------------------------------------------------------------
Install didn't work:

configure: error: libmysqlclient is needed for MySQL support

looks like it needs yet somethng else. Can you help me with this too?


-------------------------------------------------------------

Thanks
Rainner
 
Have you tried --with-mysql=/usr instead of --with-mysql? Try
Code:
locate libmysqlclient.so
, and post an output here.

Hi smtalk

I guess I wasn't clear, I'm sorry

-------------------------------------------------------------
Install didn't work:

configure: error: libmysqlclient is needed for MySQL support

looks like it needs yet somethng else. Can you help me with this too?


-------------------------------------------------------------

Thanks
Rainner
 
Have you tried --with-mysql=/usr instead of --with-mysql? Try
Code:
locate libmysqlclient.so
, and post an output here.

[root@slb home]# locate libmysqlclient.so
[root@slb home]#


nothing comes back

also I didn't try "--with-mysql=/usr instead of --with-mysql" Im not sure where to do this
 
Back
Top