Monday, October 19, 2009

Konfigurasi sederhana FTP server Linux menggunakan ProFTP

Selain menggunakan vsftpd kita dapat menggunakan proFTP sebagai server FTP di Linux.
Langkah-langkah konfigurasinya yaitu:
1. Cek apakah paket proftpd sudah terinstall

[root@Bast~]# rpm -qa |grep proftp
proftpd-1.3.1-8.el5
[root@Bast~]#

Kalau hasilnya seperti di atas brarti sudah terinstal. Kalau belum lakukan install:

[root@Bast~]# yum install proftpd

2. Setelah melakukan penginstallan, lalu edit bagian penting pada file konfigurasi proftpd.conf

[root@Bast~]# vim /etc/proftpd.conf
ServerName "FTPku"
ServerType standalone
DefaultServer on

Port 21

# Don't use IPv6 support by default.
UseIPv6 off
# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask 022

MaxInstances 30
# Set the user and group under which the server will run.
User proftpd
Group proftpd

# To cause every FTP user to be "jailed" (chrooted) into their home
# directory, uncomment this line.
DefaultRoot ~

# Normally, we want files to be overwriteable.
AllowOverwrite on
# Bar use of SITE CHMOD by default

DenyAll

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
DisplayChdir .message
# Limit WRITE everywhere in the anonymous chroot

DenyAll



Authentikasi konfigurasi diatas menggunakan authentikasi user linux biasa. Yang terletak di file /etc/passwd.
Jadi kita juga bisa tentukan lokasi path FTP kita di folder tertentu dengan user yang sudah dibuat di linux.
3. Testing dari client
Kita bisa testing menggunakan command DOS di windows.

Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.

C:\Users\LenovoN100>ftp 192.168.0.1
Connected to 192.168.0.1.
220 ProFTPD 1.3.1 Server (FTPku) [192.168.0.1]
User (192.168.0.1:(none)): ftpbas
331 Password required for ftpbas
Password:
230 User ftpbas logged in
ftp>

Atau melalui ftp client berbasis GUI contoh menggunakan FileZilla.

End. Selamat mencoba.

NB: Sesuikan kebutuhan.

No comments: