2

I'm trying to configure ProFTPD to match the following situation:

  1. Multiple domains on a single IP address.
  2. Each domain should have it's own anonymous FTP directory.
  3. Everything runs on Ubuntu 12.04LTS VPS server.

For instance, there should be an ftp://example.com and ftp://otherdomain.com, both with their own directories, both allowing only anonymous downloading.

I understand I need to create an IP alias (done using ifconfig eth0:0 192.168.1.100 (and similar for 192.168.1.101)) and set up a virtual host in proftpd.conf or virtuals.conf (tried both). This is what I currently have

<VirtualHost example.com>
    ServerName             "Example.com download"
    DefaultRoot     /var/www/example.com/ftp
    MaxClients      10

    <Anonymous /var/www/example.com/ftp>
        User        ftp
        Group       ftp
        UserAlias   anonymous ftp

        RequireValidShell   no

        DisplayLogin    welcome.msg
        DisplayChdir    .message

        <Limit LOGIN>
            AllowAll
        </Limit>
    </Anonymous>
</VirtualHost>

Whenever I try to access the server with this configuration, I get shown a request for a password. No matter what password I try, I can't get any further.

I've seen sources claim that this is impossible to do with ProFTPD and I've seen sources which give instructions on how to make it work (which I haven't been able to get running). A lot of webhosts have this type of configuration on their cheaper accounts, so it should be possible, although perhaps not with ProFTPd.

Can anybody help configure this type of setup?

Castaglia
  • 3,239
  • 3
  • 19
  • 40
Martijn
  • 346
  • 5
  • 13

1 Answers1

1

Don't know if you still have this issue (9+ months on) but this configuration is working for me:

<VirtualHost example.edu>
        RequireValidShell                        off
        ServerName                      "Anonymous FTP Server"
        Port                            4001
        Umask                           027

        <Limit LOGIN>
                DenyAll
        </Limit>

        <Anonymous /home/ftp/>
                User                    ftp
                Group                   nogroup
                UserAlias               anonymous ftp

                <Limit LOGIN>
                        AllowAll
                </Limit>

                <Limit WRITE>
                        DenyAll
                </Limit>

                <Directory incoming>
                        <Limit WRITE>
                                AllowAll
                        </Limit>
                </Directory>
        </Anonymous>
        TransferLog             /var/log/proftpd/xferlogs/anon.log
        # pre-def for firewall.
        PassivePorts            49152 50000

</VirtualHost>
EricR
  • 199
  • 4
  • 12