ProFTPD and inetd/xinetd in Ubuntu 12.04 and above

LinuxWith Ubuntu versions prior to 12.04 there was an inetd daemon running and available to be used for triggering the FTP service. Since version 12.04 inetd package is deprecated and is replaced by xinetd.

Installation of ProFTPD in older Ubuntu version was simple – just running command to install the ProFTPD

sudo apt-get install proftpd

and modifying the /etc/inetd.conf with line

ftp  stream  tcp  nowait  root  /usr/sbin/tcpd  /usr/sbin/proftpd

restarting the inetd service

sudo service inetd restart

and you were done.

In Ubuntu 12.04 the inetd package was removed as deprecated and was replaced by an upgraded version called xinetd. Developers of xinetd kept support of /etc/inetd.conf file but the correct/new approach of defining services to be maintained by the xinetd daemon is to create separate file for each service in /etc/xinetd.d folder. In case of FTP service it will be /etc/xinetd.d/ftp with the following contents (Note: the curly brackets must be on separate lines)

service ftp
{
  disable     = no
  flags       = REUSE
  socket_type = stream
  wait        = no
  user        = root
  server      = /etc/sbin/proftpd
  server_args = -c /etc/proftpd/proftpd.conf
}

Where

  • socket type
    Sets the network socket type to stream
  • protocol
    Sets the protocol to TCP
  • wait
    This option accepts yes or no values only. It defines the service to be multi-threaded (wait = no) or single-threaded (wait = yes)
  • user
    User who runs the service

To reload the configuration of xinetd call the following command and you should be up and running

sudo service xinetd restart

Leave a Reply