Thursday, December 13, 2007

Proftpd Anonymous Configuration

Although i recently installed gproftpd which provides a graphical interface to manage proftpd, the following configuration is for the proftpd

First make a user which maps to the anonymous, (this is needed because the files being written/uploaded to the server needs an owner and we thus create the user and its alais anonymous.

sudo adduser ftpuser, or through Gnome/KDE's GUI interface.

This should create the skeleton directory and stuffs. We will share /home/ftpuser/ftpshared folder as a public folder, make sure its writable.

Put the following code at the bottom of proftpd.conf, in xampp it can be found in /opt/lampp/etc/proftpd.conf

<Anonymous /home/ftpuser/ftpshared>
User ftpuser
Group ftpuser
UserAlias anonymous ftpuser
AllowOverwrite off
AuthUsingAlias On
AnonRequirePassword Off
<Limit STOR CWD XCWD CDUP MKD READ WRITE DIRS>
AllowAll
</Limit>
<Limit DELE>
DenyAll
</Limit>
<Limit LOGIN>
AllowAll
</Limit>
DisplayLogin /home/ftpuser/ftpshared/welcome.msg
</Anonymous>

The allowed methods are written in caps within the Limit tag as attributes, the configuration i've done is greedy configuration, ie it allows to read and write but doesnot allow to delete any of the files or folders.

Also create a file /home/ftpuser/ftpshared/welcome.msg and put your welcome message inside it. We're done!!

Cheers!!

No comments: