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:
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.
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:
(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:
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:
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).
I think I figured it out - will verify soon
Ok - thank some genius for coming up with virtualization. I took the time to set up a clean slate (totally fresh Xen virtual machine) and tried the tutorial without adding *any* of my own settings or preferences. It worked.
Now to speculate as to why it worked. I believe that when I used 5500 for the UID and GID I messed up when I created the original group and user (Linux user and group not proftp user/group). If I did mess that up then the ftp user/group would not have had the proper permissions to do what it needed to do and therefore authentication failed.
As to why I had the weird situation with having to stop proftpd and start it again I think it definitely was leftover from my previous failed attempts to get a working proftpd install.
This being said I am going to just restore a backup that I made of the original virtual machine prior to me messing around with FTP (I love backups!) and start from there. I feel that I can certainly get it working now.
By the way - I highly recommend Falko's tutorials in general and if you are interested in getting Xen up and running for yourself I think you should use this tutorial:
After a good 3 days of research and work I created a backup script (that is not quite finished) that will work on the types of virtual machines that the tutorial helps you create. The main missing facility is a way to restore from the backup or to create a virtual machine clone based on a backup.
I have attached the script for anyone who wants to use it (as is with no warranties yadda yadda yadda). Also, use this set of commands to add the script as a bash command and create backups.
You need sudo or root permissions to run the xenbak command.
Use this command to backup all the domains (running or not) using default options.
-a (Backup all domains)
-c (Create a CD backup. Must put a blank or rewritable disk in the drive before it reaches this stage of the process)
-C (Compress each domain backup into a .tar.gz file - usually required if you want your backup ISO to be small enough to fit on a CD)
-r (Remove previous backups before backing up the domain(s))
-e (Erase the CD in the drive before attempting to write to it)
-j (Automatically eject the disk once the backup is complete.
-E (Spews out a bunch of output that tells you what options you chose.)
Here is the command I use to backup a single domain to a custom named backup and compress it and write it to CD after making sure the disk has been erased. It also ejects the disk once the backup is complete.
The problem was in fact the initial setup of the ftp user and group. However, I still haven't gotten it to boot up into the proftpd that works so I can't say how to fix that.
When I finish the rest of the features for the xenbak script I will create a new script for restoring and cloning from the backups it makes. I will try to remember to come post them here once they're done.
|All times are GMT +2. The time now is 11:08.|
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.