Anonymous FTPd using ProFTPd

youds

Verified User
Joined
Jul 11, 2008
Messages
477
Location
Lancashire, UK
Hi

I require to have an anonymous FTP solution for ftp://mirrors.gethosted.online, pointing to public_ftp folder.

After running into problems with PureFTPd, I have switched to ProFTPd as my preferred FTP fileserver by running the following commands:

Code:
cd /usr/local/directadmin/custombuild
./build update
./build set ftpd proftpd
./build proftpd

As outlined here https://help.directadmin.com/item.php?id=82

I have also bought and assigned a unique IP address for this user which is responding to ping requests.

I have tried enabling anonymous logins and have done "service directadmin restart" and "service proftpd restart" with no luck.

There is no mention of where anonymous FTP will point to, I'm hoping it will go straight to public_ftp.

All of this has been done with zero success.

Can anybody help?
 
Modify user privileges in directadmin and allow "anonymous ftp" for it
 
I have just tried creating a user "test" password "test" as seen below with no joy:

Code:
Status:          Connecting to 54.38.210.33:21...
Status:          Connection established, waiting for welcome message...
Status:          Initializing TLS...
Status:          Verifying certificate...
Status:          TLS connection established.
Command:    USER test
Response:     331 Password required for test
Command:    PASS ****
Response:     530 Login incorrect.
Error:            Critical error: Could not connect to server

I will try on PureFTPd connection (default mode) here are the results:

Code:
Status:          Connecting to 54.38.210.33:21...
Status:          Connection established, waiting for welcome message...
Status:          Initializing TLS...
Status:          Verifying certificate...
Status:          TLS connection established.
Command:    USER [email protected]
Response:     331 User [email protected] OK. Password required
Command:    PASS *******
Response:     530 Login authentication failed
Error:            Critical error: Could not connect to server

However using mirrors.gethosted.online host made this work (not IP address)

Switching back to ProFTPd to verify that works ok...

Code:
Status:          Resolving address of mirrors.gethosted.online
Status:          Connecting to 51.77.116.220:21...
Status:          Connection established, waiting for welcome message...
Status:          Initializing TLS...
Status:          Verifying certificate...
Status:          TLS connection established.
Status:          Logged in
Status:          Retrieving directory listing...
Status:          Directory listing of "/" successful

This leads me to thinking it could be because my new IP address isn't resolved by mirrors.gethosted.online hence won't work (as described above)

I will verify DNS and repost when done.
 
Ah, no joy. I thought when the DNS updates it would work with no login credentials - but no:

Code:
Status:          Resolving address of mirrors.gethosted.online
Status:          Connecting to 54.38.210.33:21...
Status:          Connection established, waiting for welcome message...
Status:          Initializing TLS...
Status:          Verifying certificate...
Status:          TLS connection established.
Command:    USER anonymous
Response:     331 Password required for anonymous
Command:    PASS *********************
Response:     530 Login incorrect.
Error:            Critical error: Could not connect to server

Just to say, my testing account is working ok under ProFTPd, no restarts needed anywhere either after installing via custombuild.

Steps I have taken:
- Assigned single-use IP address
- Enabled Anonymous read-only access from DirectAdmin Control Panel
- Switched to ProFTPd (working for normal accounts)

However anonymous still returns failed login.

Kind regards
 
I don't know about proftpd, don't use that. But if I'm not mistaken, for pure-ftpd you have to enable anonymous access in the config file.
Seems this is by default:
# Disallow anonymous connections. Only accept authenticated users.

NoAnonymous yes
I've found something on the internet about allowing anonymous ftp for proftpd, but won't post it as in DA it might be done different.
 
That does work, however I am going to try and get ProFTPd working, as I'm not sure on Pure-FTPd. (it requires some custom config because it defaults to /var/ftp, not the folder I wanted)
 
So, here was the final /etc/proftpd.conf config:
Code:
DefaultRoot    ~
<Anonymous /home/mirrors/domains/mirrors.gethosted.online/public_ftp>
<Limit LOGIN>
    AllowAll
</Limit>
    User  mirrors
    Group  mirrors
    UserAlias  anonymous mirrors
<Directory *>
    <Limit WRITE>
       DenyAll
    </Limit>
</Directory>
</Anonymous>

For anyone reading this after, make sure your user/group has access to the directory which you are editing.
 
Very nice, thank you for sharing.

Now I'm curious about how to get this to work with pure-ftpd. :) So if anybody knows and reads this later...
 
So I came back to this frustrated (with myself) for not being so clear.

From doing the following to completion, here's my story.

Code:
cd /usr/local/directadmin/custombuild
./build set ftpd proftpd
./build proftpd d

As you navigate through the document, you can see there is a UserAlias directive that is commented out, uncomment this.

Then add the following config as the penultimate definition within the configuration file (just above Include /etc/proftpd.vhosts.conf):

Code:
DefaultRoot    ~
<Anonymous /home/mirrors/domains/mirrors.gethosted.online/public_ftp>
<Limit LOGIN>
    AllowAll
</Limit>
    User  mirrors
    Group  mirrors
    UserAlias  anonymous mirrors
<Directory *>
    <Limit WRITE>
       DenyAll
    </Limit>
</Directory>
</Anonymous>

Don't forget - these are server wide settings and could be overwritten by custombuild if updates are done, so make sure to add changes to /usr/local/directadmin/custombuild/configure/proftpd/conf/proftpd.conf.

As for PureFTPd, I could get the user accounts working but not the anonymous. ProFTPd is just my personal choice.
 
As for PureFTPd, I could get the user accounts working but not the anonymous. ProFTPd is just my personal choice.
Yep, I understand. Thank you for the addition about proftpd.

I just was curious because I like pure-ftpd more and maybe someone runs into the solution in the future.
 
Back
Top