How to turn off Anonymous FTP?


I don’t need creation of anonymous FTP user. How do I turn it off on Virtualmin Pro?


Howdy A,

Virtualmin does not configure anonymous FTP access at all, and our ProFTPd package is not configured, by default, to allow any anonymous access.

You can check by looking at the /etc/proftpd.conf configuration. There is a commented out section at the end of the default .conf file that starts with:

A basic anonymous configuration, with an upload directory.

#< Anonymous ~ftp>

It’s a big section, so I won’t include it all…but I don’t think there’s any other way to end up with anonymous access.

Hey A,

Heh. Looks like we do enable anonymous FTP on a per-domain basis, by default. Must have had someone request that at some point in the past (and I see now that it’s been around for quite a while). I’m dead set against FTP as a protocol in general, and the sooner it dies the better off we’ll all be, but I’m constantly amazed to find strong desire for more FTP access by default (and when something goes wrong we hear about it faster than just about any other kind of bug).

In short, yep, you can either delete the anonymous section, or comment it out. I think that’s a fine idea, though it probably isn’t going to hurt anything to leave it in.

Thanks for clarifying, Joe. Yes, I believe in the KISS philosophy - Keep It Simple Stupid, and remove things that are not necessary, to reduce security risks.

Thanks mate!

The reason I asked is because I see this at Edit Server Template section…

ProFTPd directives for new servers:

ServerName ${DOM}
< Anonymous ${HOME}/ftp>
User ftp
Group ftp
UserAlias anonymous ftp
< Limit WRITE>
< /Limit>
RequireValidShell off
ExtendedLog ${HOME}/logs/ftp.log
< /Anonymous>

What does the above do? Do I need to erase it or turn it off somewhere?


Hi this anonymous FTP access is still active by default.
So I want to remove the

< An onymous ${HOME}/ftp > … < /Anonymous>
section in “Virtual server template details (ProFTPd virtual FTP)”.

After that there is only one line left: ServerName ${DOM}

When I save, i get this error:
Failed to save server template : Missing User directive

what am I doing wrong? Thanks for your help

Change the user in the ProFTPd template to be nobody.