VSFTPD merupakan aplikasi atau daemon server FTP. Konfigurasi untuk VSFTPD ini juga relatif mudah. Berikut ini akan saya jelaskan konfigurasi untuk VSFTPD:

1. Edit file vsftpd.conf
[[email protected]]# vim /etc/vsftpd/vsftpd.conf

2. Periksa file vsftpd.conf sesuai konfigurasi dibawah ini:
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
anon_upload_enable=YES
anon_mkdir_write_enable=YES
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_file=/var/log/vsftpd.log
xferlog_std_format=YES
idle_session_timeout=600
data_connection_timeout=120
nopriv_user=ftp
ftpd_banner=WELCOME TO FTP SERVER.
chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd/chroot_list
listen=YES
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
# Yang dapat diakses oleh client ke FTP Server
#ALLOWED FOR ALL
cmds_allowed=CDUP,CWD,RNFR,RNTO,PORT,MKD,RMD,DELE,STOR, GET,PUT,PASV,FEAT,RETR,PWD,LIST,TYPE,LS,ASCII,BIN,HASH

##################
# COMMAND CMDS
##################

###########################################
# ABOR – abort a file transfer
# CWD – change working directory
# DELE – delete a remote file
# LIST – list remote files
# MDTM – return the modification time of a file
# MKD – make a remote directory
# NLST – name list of remote directory
# PASS – send password
# PASV – enter passive mode
# PORT – open a data port
# PWD – print working directory
# QUIT – terminate the connection
# RETR – retrieve a remote file
# RMD – remove a remote directory
# RNFR – rename from
# RNTO – rename to
# SITE – site-specific commands
# SIZE – return the size of a file
# STOR – store a file on the remote host
# TYPE – set transfer type
# USER – send username
#

# less common commands:
# ACCT* – send account information
# APPE – append to a remote file
# CDUP – CWD to the parent of the current directory
# HELP – return help on using the server
# MODE – set transfer mode
# NOOP – do nothing
# REIN* – reinitialize the connection
# STAT – return server status
# STOU – store a file uniquely
# STRU – set file transfer structure
# SYST – return system type
###########################################

3. Buat file chroot_list
[[email protected]]# touch /etc/vsftpd/chroot_list

4. Restart vsftpd
[[email protected]]# service vsftpd restart

5. Buat grup user dan direktori file FTP
[[email protected]]# groupadd ftp-users
[[email protected]]# mkdir /home/ftp-docs

6. Buat direktori yang akan di akses grup ftp-users
[[email protected]]# chmod 777 /home/ftp-docs
[[email protected]]# chown root:ftp-users /home/ftp-docs

7. Tambah user dan buat direktori default untuk /home/ftp-docs
[[email protected]]# useradd -g ftp-users -d /home/ftp-docs user1
[[email protected]]# useradd -g ftp-users -d /home/ftp-docs user2
[[email protected]]# useradd -g ftp-users -d /home/ftp-docs user3
[[email protected]]# useradd -g ftp-users -d /home/ftp-docs user4
[[email protected]]# passwd user1
[[email protected]]# passwd user2
[[email protected]]# passwd user3
[[email protected]]# passwd user4

8. Copy files yang akan di download oleh user pada /home/ftp-docs
9. Ubah hak akses untuk files pada direktori /home/ftp-docs
[[email protected]]# chown root:ftp-users /home/ftp-docs/*
[[email protected]]# chmod 777 /home/ftp-docs/*

10. Periksa hak akses jaringan linux:
[[email protected]]# getsebool -a | grep ftp
[[email protected]]# setsebool -P ftp_home_dir on
[[email protected]]# getsebool -a | grep ftp

Selamat mencoba.  

Share