FTP Server on Ubuntu

I'm using vsftpd on an internal server, so I can only answer for that one…

vsftpd has basically two parameters to control the directory listing in its /etc/vsftpd.conf

dirlist_enable
    If set to NO, all directory list commands will give permission denied.

    Default: YES

dirmessage_enable
    If enabled, users of the FTP server can be shown messages when they 
    first enter a new directory. By default, a directory is scanned for
    the file .message, but that may be overridden with the configuration 
    setting message_file.

    Default: NO (but the sample config file enables it) 

download_enable
    If set to NO, all download requests will give permission denied.

    Default: YES 

So in your case, you should definitely add:

dirlist_enable=NO

as a minimum and depending on your use-case, also disable downloads and dirmessages. (and that's why I added the download_enable parameter, which doesn't really control any directory listings)

Source: man vsftpd.conf

Having said all that, on a public server, I wouldn't allow standard ftp to run any more, but would use something like sftp.


If you have setup OpenSSH on this machine, you have built-in sftp for all user accounts. Most modern ftp clients have builtin support for sftp. It is also much more secure than regular ftp and the overhead tax for using encryption is minimal. In fact, over my local network, sftp is faster than ftp. Give it a shot, it operates on the same port as ssh and even works while using ssh-key login.

Give it a shot, you also save yourself the resources of running another process altogether.

Tags:

Ftp