View Single Post
  #1  
Old 18th October 2008, 02:55
mongoose643 mongoose643 is offline
Junior Member
 
Join Date: Oct 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default ProFTPd + MySQL refuses to work

Ok - I have scoured the internet and these forums high and low and in between and I cannot figure out the cause or solution to a couple of problems.

First let me give some background:

I'm running Ubuntu 8.04 LTS Server on a Dell desktop. However, I'm also using a Xen virtualized domain inside of that. The Xen virtualized domain is also using Ubuntu 8.04 LTS Server.

I found a tutorial for using proftpd and it suggesting compiling it myself. I tried but it refused to compile properly and threw
cryptic configuration error messages at me.

Next I tried just installing proftpd and trying to follow the same tutorial. That was a mistake that I should have learned to avoid long ago but my hopes and desires overcame me and I did it anyway.

So to try and repair the damage I ran these commands:

Code:
# apt-get remove proftpd
# apt-get autoremove
to make sure unused stuff was out of my way. I then removed files and directories that were left over from the install.

Next I came back to howtoforge and I followed this tutorial to get started since Falko's tutorials always seem to put me on the right track.

http://www.howtoforge.com/virtual-ho...ql-ubuntu-8.04

Note that I am using a terminal on my macbook to test the ftp connection. The macbook and my dell desktop are on the same local network.

Domain0 on the dell server has a static IP of 192.168.1.50. The Xen1 domain on the dell server has a static IP of 192.168.1.61.

I use a plain Linksys Wireless-G router where I have set up port forwarding to the IP 192.168.1.61 for the port range 1-40000 - one to forty thousand.

As noted in the subject, I am trying to use MySQL for credential storage.

Database name: proftp

The only user row I have set up is this:

user: devtest
password: devtest
UID: 5500
GID: 5500
(obviously not secure but I just want something I can type quickly while I get this to work)

The group table has the following single row in it:

name: ftpgroup
GID: 5500
members: ftpuser

Thanks to some misconfigurations and typos on my part it took me a while to get a matching setup but now for the life of me I can't figure out why the following things are happening.

If I reboot the virtualized OS and attempt to connect to it once finishes rebooting I get this output:

Code:
$ ftp devtest@192.168.1.61
Connected to 192.168.1.61.
220 ProFTPD 1.3.1 Server (Debian) [192.168.1.61]
421 Service not available, remote server has closed connection.
ftp: Login failed.
ftp> exit
At this point I check the logfile (which I blanked before rebooting) and here are the contents of the logfile:

Code:
Oct 17 19:22:17 xen1.fakedomain.com proftpd[3537] xen1.fakedomain.com: ProFTPD 1.3.1 (stable) (built Thu Feb 21 04:21:14 UTC 2008) standalone mode STARTUP
Oct 17 19:24:11 xen1.fakedomain.com proftpd[3609] xen1.fakedomain.com (192.168.1.100[192.168.1.100]): FTP session opened.
Oct 17 19:24:11 xen1.fakedomain.com proftpd[3609] xen1.fakedomain.com (192.168.1.100[192.168.1.100]): FTP session closed.
If I then run the following commands (note that I'm running root for sheer convenience after hours upon hours of fighting with this):

Code:
root@xen1:~# /etc/init.d/proftpd stop
 * Stopping ftp server proftpd
   ...done.
root@xen1:~# netstat -pant
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:4136            0.0.0.0:*               LISTEN      3585/perl       
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      3454/mysqld     
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      3558/apache2    
tcp        0      0 192.168.1.61:53         0.0.0.0:*               LISTEN      3329/named      
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      3329/named      
tcp        0      0 127.0.0.1:953           0.0.0.0:*               LISTEN      3329/named      
tcp6       0      0 :::53                   :::*                    LISTEN      3329/named      
tcp6       0      0 :::22                   :::*                    LISTEN      3354/sshd       
tcp6       0      0 ::1:953                 :::*                    LISTEN      3329/named      
tcp6       0      0 192.168.1.61:22         192.168.1.1:51841       ESTABLISHED 3593/0          
root@xen1:~# proftpd
root@xen1:~# netstat -pant
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:4136            0.0.0.0:*               LISTEN      3585/perl       
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      3454/mysqld     
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      3558/apache2    
tcp        0      0 0.0.0.0:21              0.0.0.0:*               LISTEN      3622/proftpd: (acce
tcp        0      0 192.168.1.61:53         0.0.0.0:*               LISTEN      3329/named      
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      3329/named      
tcp        0      0 127.0.0.1:953           0.0.0.0:*               LISTEN      3329/named      
tcp6       0      0 :::53                   :::*                    LISTEN      3329/named      
tcp6       0      0 :::22                   :::*                    LISTEN      3354/sshd       
tcp6       0      0 ::1:953                 :::*                    LISTEN      3329/named      
tcp6       0     48 192.168.1.61:22         192.168.1.1:51841       ESTABLISHED 3593/0          
root@xen1:~#
Now if I try to connect via FTP again I get this output:

Code:
$ ftp devtest@192.168.1.61
Connected to 192.168.1.61.
220 ProFTPD 1.3.1 Server (ProFTPD Default Installation) [192.168.1.61]
331 Password required for devtest
Password: 
530 Login incorrect.
ftp: Login failed.
ftp> exit
221 Goodbye.
And now the logfile shows this (includes data from earlier):

Code:
ct 17 19:22:17 xen1.fakedomain.com proftpd[3537] xen1.fakedomain.com: ProFTPD 1.3.1 (stable) (built Thu Feb 21 04:21:14 UTC 2008) standalone mode STARTUP
Oct 17 19:24:11 xen1.fakedomain.com proftpd[3609] xen1.fakedomain.com (192.168.1.100[192.168.1.100]): FTP session opened.
Oct 17 19:24:11 xen1.fakedomain.com proftpd[3609] xen1.fakedomain.com (192.168.1.100[192.168.1.100]): FTP session closed.
Oct 17 19:28:36 xen1.fakedomain.com proftpd[3537] xen1.fakedomain.com: ProFTPD killed (signal 15)
Oct 17 19:28:36 xen1.fakedomain.com proftpd[3537] xen1.fakedomain.com: ProFTPD 1.3.1 standalone mode SHUTDOWN
I'm attaching my configuration files to this post. I've also included an exported SQL file for anyone who wants to look over that too. I will not deny that there is a possibility of a really dumb oversight on my part since I have dealing with this for so long today and I'm getting a bit tired and frustrated with it. (The files all have .txt appended to them because the uploader won't accept .conf or .sql files in case anyone is wondering why I did that.)

[EDIT]
I wonder if I am accidentally running two different sets of proftpd. One that uses inetd (contents below) and one that is standalone (though my logfile says otherwise - just attached).

Code:
#<off>
## ftp	stream	tcp	nowait	root	/usr/sbin/tcpd /usr/sbin/proftpd
Attached Files
File Type: txt proftp.sql.txt (3.4 KB, 305 views)
File Type: txt proftpd.conf.txt (4.7 KB, 301 views)
File Type: txt modules.conf.txt (1.0 KB, 238 views)
File Type: txt proftpd.log.txt (597 Bytes, 231 views)
File Type: txt sql.conf.txt (2.4 KB, 229 views)

Last edited by mongoose643; 19th October 2008 at 20:11.
Reply With Quote
Sponsored Links