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

I installed the pure-ftpd package (version 1.0.35-1) on an Ubuntu 12.04 box (an EC2 instance based on the standard Ubuntu 12.04 AMI).

The pure-ftpd daemon is running (verified with ps), though there is no PID file (expected one to be created by the /etc/init.d/pure-ftpd script).

Here's the resulting command that gets run by the init.d script:

/usr/sbin/pure-ftpd -l pam -O clf:/var/log/pure-ftpd/transfer.log -o -8 UTF-8 -u 1000 -E -B -g /var/run/pure-ftpd/pure-ftpd.pid

Here's my real problem: the ftp server isn't actually listening on any port (checked with netstat and nmap). So I can't ftp to the server (either locally using localhost or remotely using the public IP address).

I tried adding a Bind file to /etc/pure-ftpd/conf and restarting, but it didn't help.

When I installed pure-ftpd, it replaced inetd with openbsd-inetd, but did not run it since there were no services enabled. So inetd is not listening on port 21 either. (Apparently Ubuntu has a no-inetd-by-default policy, according to https://lists.ubuntu.com/archives/ubuntu-users/2010-September/227905.html .) I want to run pure-ftpd by itself (not with inetd) anyways, since the /etc/init.d/pure-ftpd script requires no inetd if you use the UploadScript feature.

I'm not familiar with how Ubuntu handles network services (and can't find any relevant docs besides generic man pages), so I'm probably missing something obvious. Nothing seems out of the ordinary with /etc/hosts.allow (empty) or hosts.deny (empty), and I didn't add any firewall rules (iptables -L shows that the firewall is in its initial state). I've checked the pure-ftpd docs; not sure what else to look at.

Any help would be appreciated, thanks!

Update: Here's the output from netstat:

$ sudo netstat -tulnp

Active Internet connections (only servers)

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      629/sshd        
tcp6       0      0 :::22                   :::*                    LISTEN      629/sshd        
udp        0      0 0.0.0.0:68              0.0.0.0:*                           395/dhclient3   

Update:

I am able to start pure-ftpd if I bind it to a non-privileged port (ie. >1024).

Also, when I started pure-ftpd with full debug logging, I saw the following in the syslog:

pure-ftpd: (?@localhost) [ERROR] altlog /var/log/pure-ftpd/transfer.log: Permission denied

Note that this directory is owned by root.

This suggests to me that, although pure-ftpd is running as root (according to 'ps aux'), it doesn't have root-like permissions that it would need to write to root-owned directories or bind to privileged ports. Anybody know what might be going on here?

share|improve this question
1  
Could you post the sudo netstat -tulnp output ? –  golja Sep 18 '12 at 5:38
    
sh -x /etc/init.d/pure-ftpd start? –  quanta Sep 18 '12 at 6:18
    
This may sound obvious, but isn't there nothing helpfull in /var/log/pure-ftpd/transfer.log ? Also just for debug run the pure-ftpd command on an custom port to see if the problem is port related (-S CUSTOM_PORT) and also add -d (debug mode == will log a lot of information in syslog). Hopefully this will help you solve the problem. –  golja Sep 18 '12 at 6:34
    
I'm just getting into pure-ftpd, but I'm wondering a few things: 1) what your init script looks like –  mltsy Oct 8 '12 at 18:24
    
Sorry: I'm just getting into pure-ftpd, but I'm wondering a few things: 1) what does your init script look like (does it use start-stop-daemon?), 2) What happens if you sudo that command yourself from a command-line, as a background task? Does it work? –  mltsy Oct 8 '12 at 18:30

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.