Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
No, it's not running, try to run proftpd manually with "sudo proftpd -n -d 10" for debug –  GioMac Aug 17 '13 at 9:53
    
sudo proftpd -n -d 10 sudo: proftpd: command not found so proftpd is not running after all I guess.. –  rhand Aug 17 '13 at 9:55
    
sudo /opt/local/bin/proftpd -n -d 10 –  GioMac Aug 17 '13 at 9:56
    
Hmm odly enough the binary is not in /opt/local/bin : sudo /opt/local/bin/proftpd -n -d 10 sudo: /opt/local/bin/proftpd: command not found even though I installed it and port installed | grep proftpd proftpd @1.3.3e_0 (active) –  rhand Aug 17 '13 at 10:01
    
sudo /opt/local/sbin/proftpd -n -d 10 –  GioMac Aug 17 '13 at 10:01

2 Answers 2

up vote 1 down vote accepted

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.

share|improve this answer
    
Uninstalling and reinstalling has been taken care of, but I still have the connection refused. Stop using MacPorts for Fink or Homebrew is something I want to avoid if I can. The next Mac I buy will probably get Homebrew, but this MBP will keep MacPorts if possible. –  rhand Aug 17 '13 at 10:23
    
OK, let's continue investigation. "sudo /opt/local/etc/LaunchDaemons/org.macports.proftpd/proftpd.wrapper start". Also, please upload contents of this file and update your question accordingly. –  GioMac Aug 17 '13 at 10:26
    
Worked like a charm! Thanks! See updated question. Not sure why this was necessary though. Should have been running already.. –  rhand Aug 17 '13 at 10:36
1  
OK, looks like problem with /opt/local/bin/daemondo or running script :S –  GioMac Aug 17 '13 at 10:37

The wrapper that tries to start/stop/restart ProFTPd seems to be running, but not the ProFTPd itself. The reasons that can lead to this that come up to my mind:

  • A typo or two in ProFTPd configuration file
  • ProFTPd pid file configured to be in a directory where it does not have permissions to write
  • Bad permissions in ProFTPd data directory
  • Something changed in authentication which ProFTPd is configured to use
  • Just a broken build of ProFTPd itself.

What happens if you try to start ProFTPd from shell manually? Like, /path/to/proftpd/binary?

share|improve this answer
    
Config of ProFTPD I added as a pasty here: pastebin.com/4VvSHz5p Looking for the path atm. –  rhand Aug 17 '13 at 9:58
    
Err, is that all? No <Directory> etc parameters at all, so ProFTPd has no idea what directories to serve. I hope you have some additional config files somewhere. If not, your ProFTPd config file is severely lacking the meat. –  Janne Pikkarainen Aug 17 '13 at 10:00
    
Well, I guess I did as all worked and connections were not refused.. But no idea where. –  rhand Aug 17 '13 at 10:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.