Ftp – ProFTP on MacPorts: Connection refused

ftpmac-osxosx-lionproftpd

I have a MacPorts installed ProFTPD daemon installed. It worked like a charm for a year. Now it does not work at all anymore. All I get is

Connection refused

ftp localhost
Trying ::1...
ftp: Can't connect to `::1': Connection refused
Trying 127.0.0.1...
ftp: Can't connect to `127.0.0.1': Connection refused
Trying fe80::1%lo0...
ftp: Can't connect to `fe80::1%lo0': Connection refused
ftp: Can't connect to `localhost'

I wrote to MacPorts and ProFTP, but no answers there as of yet so I hope someone here can help me out.

Troubleshooting

Found some troubleshooting tips here.
When I check for ProTPD processes I get

ps -ef | grep proftpd
    0    58     1   0  4Aug13 ??         0:00.77 /opt/local/bin/daemondo --label=proftpd --start-cmd /opt/local/etc/LaunchDaemons/org.macports.proftpd/proftpd.wrapper start ; --stop-cmd /opt/local/etc/LaunchDaemons/org.macports.proftpd/proftpd.wrapper stop ; --restart-cmd /opt/local/etc/LaunchDaemons/org.macports.proftpd/proftpd.wrapper restart ; --pid=none
  501 27233 26992   0  1:42PM ttys000    0:00.00 grep proftpd

So it seems some processes are running. But not the needed ProFTPD process.

When I used the following command to see if port 21 is active:

sudo lsof -i :21

I get zero results. So ProFTPD is clearly not running and port 21 is not active which is the regular FTP port.

Question

Does anyone here know what I am missing here? I need it back to to the sweet any easy updating of local website copies.

Update

ProFTPD Configuration file is here http://pastebin.com/4VvSHz5p . Even though it is a basic setup there does not seem to be anything wrong with it. @Janne Pikkarainen mentioned it was missing directories, but in the end this was not the issue.

Update 2 Debug Commands

Asked by GioMac I tried sudo proftpd -n -d 10. Command was not found. The command sudo /opt/local/sbin/proftpd -n -d 10 did work and gave us some clues

Update 3 Re-installation Port

I reinstalled all as suggested by GioMac and that did not work either. Still had the same errors.

Update 4 The Solution: Proper (re)starting ProFTDP

Then I ran sudo /opt/local/etc/LaunchDaemons/org.macports.proftpd/proftpd.wrapper start as suggested by @GioMac. Running similar command from sbin and bin did not work. And then I tested the FTP connection again.

sudo /opt/local/etc/LaunchDaemons/org.macports.proftpd/proftpd.wrapper start
Password:

Command worked and I had no errors. ProFTPD was (re)started like this again. Then I did the ultimate test to see if I could FTP locally again:

jaspersmbp:etc jasper$ cd
jaspersmbp:~ jasper$ ftp jasper@localhost
Trying ::1...
ftp: Can't connect to `::1': Connection refused
Trying 127.0.0.1...
Connected to localhost.
220 ProFTPD 1.3.3e Server (ProFTPD Default Installation) [127.0.0.1]
331 Password required for jasper
Password: 
230 User jasper logged in
Remote system type is UNIX.

Eureka! Connection could be made again and I could also update my local WordPress installations again.

Best Answer

Looks like there's something wrong with this file, probably something changed in the system or package is broken. Try to reinstall...

/opt/local/etc/LaunchDaemons/org.macports.proftpd/proftpd.wrapper

Use fink instead - these builds are more stable for me.