OK, voor degenen die ProFTPd willen: eerst kijken of je de nieuwste versie hebt.
voor de RPM (Opmerking: Deze worden niet onderhouden door RedHat Software).
Als je het pakket eenmaal gedownload en geïnstalleerd hebt via een van de methoden.
(Onthoud: Om proftpd te installeren via rpm moet je de wu-ftpd en anonftp wegdoen.)
Je moet het configuratiebestand aanpassen voor je site.
Als je de RHCN rpm gebruikte, staat het configuratiebestand in
/etc/proftpd.conf
. Als je hem zelf gecompileerd hebt, staat het
configuratiebestand in: /usr/local/etc/proftpd.conf
.
Nu voor de configuratie: open het configuratiebestand met een editor naar keuze. Het bestand ziet er ongeveer uit als hieronder:
# This is a basic ProFTPD configuration file (rename it to
# 'proftpd.conf' for actual use. It establishes a single server
# and a single anonymous login. It assumes that you have a user/group
# "nobody" and "ftp" for normal operation and anon.
ServerName "ProFTPD Default Installation"
ServerType standalone
DefaultServer on
# Port 21 is the standard FTP port.
Port 21
# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask 022
# To prevent DoS attacks, set the maximum number of child processes
# to 30. If you need to allow more than 30 concurrent connections
# at once, simply increase this value. Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd)
MaxInstances 30
# Set the user and group that the server normally runs at.
User nobody
Group nogroup
# Normaal gesproken willen we dat bestanden overschrijfbaar zijn.
<Directory /*>
AllowOverwrite on
</Directory>
# A basic anonymous configuration, no upload directory's.
<Anonymous ~ftp>
User ftp
Group ftp
# We want clients to be able to login with "anonymous" as well as "ftp"
UserAlias anonymous ftp
# Beperk het aantal anonieme logins
MaxClients 10
# We want 'welcome.msg' displayed at login, and '.message' displayed
# in each newly chdired directory.
DisplayLogin welcome.msg
DisplayFirstChdir .message
# Limit WRITE everywhere in the anonymous chroot
<Limit WRITE>
DenyAll
</Limit>
</Anonymous>
Het eerste wat we doen is onze server configureren voor onze eigen site. We beginnen met de volgende regel:
ServerName "ProFTPD Default Installation"
Verander het in een zelfgekozen server naam. Bijvoorbeeld "Reggy's Ftpsite". Dan zal het er zo uitzien:
ServerName "Reggy's Ftpsite""
Daarna gaan we kijken welk servertype we nemen. Je kunt kiezen tussen een die altijd draait of een net als de inetd deamon, dat betekent dat de server start en stopt als de connecties komen en gaan. inetd heeft mijn voorkeur, dus ik verander het en dan ziet het er zo uit:
ServerType inetd
Onthoud: Als je het wilt starten met inetd dan moet je ook een regel aanmaken
in /etc/inetd.conf
:
ftp stream tcp nowait root /usr/sbin/proftpd proftpd
Voor stand alone moet je jezelf hier niet druk over maken. Je moet niets veranderen aan de Port en Umask, het mag wel. Ik laat de User nobody en verander de group ook in nobody. Dus dit gaat er zo uitzien:
User nobody
Group nobody
Nu moet je een beslissing nemen over de bestanden. Ik vind het niet leuk dat bestanden overschrijfbaar zijn, dus ik verander het in:
<Directory /*>
AllowOverwrite off
</Directory>
De setup voor anonymous laat ik met rust. Dit staat standaard aan, zonder dat ze kunnen schrijven.Er zijn nog veel meer andere opties voor ProFTPd. Kijk in de overige documentatie voor meer opties.