Installasi FTP server dengan ProFTPd

Attention: open in a new window. PDFPrintE-mail

Oleh hari-huhui ( This e-mail address is being protected from spambots. You need JavaScript enabled to view it )

Asumsi-asumsi:
==============
- Artikel ini hanyalah membahas basic configuration dari ftp server, untuk pengembangan lebih lanjut silahkan baca-baca di www.proftpd.org.
- Paket proftpd yg digunakan adalah proftpd-1.2.4.tar.gz Langkah-langkah instalasi:
==========================
- Download paket proftpd-1.2.4.tar.gz dari situs www.proftpd.org

- Ekstrak ke direktori yg anda suka:
[root@taubat hari]# tar zxvf proftpd-1.2.4.tar.gz -C /usr/local/src

- Pergi ke direktori baru hasil ekstrak:
[root@taubat src]# cd proftpd-1.2.4

- Compile dan install:
[root@taubat proftpd-1.2.4]# ./configure; make; make install

- Buat user yang akan menjalankan proftpd:
[root@taubat proftpd-1.2.4]# useradd proftpd -s /dev/null

- Buat home directory untuk anonymous:
[root@taubat proftpd-1.2.4]# mkdir /home/ftp

- Edit file konfigurasi proftpd dengan text editor yg anda suka:
[root@taubat proftpd-1.2.4]# vi /usr/local/etc/proftpd.conf

- Contoh file konfigurasi proftpd.conf untuk basic ftp server:

# 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 "Hari-huhui"
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 proftpd
Group proftpd

# Normally, we want files to be overwriteable.
<Directory /*>
AllowOverwrite on
</Directory>

# A basic anonymous configuration, no upload directories.
<Anonymous /home/ftp>
RequireValidShell off
User ftp
Group ftp
# We want clients to be able to login with "anonymous" as well as "ftp"
UserAlias anonymous ftp

# Limit the maximum number of anonymous 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>

- Jalankan proftpd:
[root@taubat proftpd-1.2.4]# /usr/local/sbin/proftpd

- Jika ada error, selalu lakukan cek di /var/log/messages, anda akan menemukan informasi yg sangat berharga di situ :)
[root@taubat proftpd-1.2.4]# tail /var/log/messages

- Jika tidak ada error, lakukan test dengan mencoba ftp server baru anda :)

[root@taubat proftpd-1.2.4]# ftp localhost
Connected to localhost (127.0.0.1).
220 ProFTPD 1.2.4 Server (Hari-huhui) [taubat.nasuha.org]
Name (localhost:root): hari
331 Password required for hari.
Password:
230 User hari logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>

- Lakukan test juga terhadap konfigurasi anonymous ftp server anda :)

[root@taubat proftpd-1.2.4]# ftp localhost
Connected to localhost (127.0.0.1).
220 ProFTPD 1.2.4 Server (Hari-huhui) [taubat.nasuha.org]
Name (localhost:root): anonymous
331 Anonymous login ok, send your complete email address as your password.
Password:
230 Anonymous access granted, restrictions apply.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>

Jika output yang keluar adalah seperti di atas, maka selamat, ftp server anda telah berjalan dengan baik :)

Alhamdulillaahirabbil'aalamiin

Note: makasih oom atas artikel yang sangat bermanfaat ini.
oom hary dapat ditemui di channel IRC #indolinux dalnet dengan nick hari-huhui :)
Comments (0)
Only registered users can write comments!