VSFTPD (Very Secure File Transfer Protocol Daemon) merupakan sebuah FTP server pada Ubuntu. Disini akan dijelaskan instalasi FTP Server VSFTPD pada Linux Ubuntu 18.04. FTP server adalah suatu server yang menjalankan software yang berfungsi untuk memberikan layanan tukar menukar file dimana server tersebut selalu siap memberikan layanan FTP apabila mendapat permintaan (request) dari FTP client.
1. Instalasi VSFTPD di Ubuntu 18.04
Paket vsftpd sudah tersedia di repositori Ubuntu. Untuk cara instal FTP ini, cukup jalankan perintah berikut:
# sudo apt update
Layanan vsftpd akan secara otomatis start setelah proses instalasi selesai. Verifikasi dengan mencetak status layanan dengan perintah berikut:
# sudo systemctl status vsftpd
2. Konfigurasi VSFTPD
Backup file vsftpd.conf
# cp /etc/vsftpd.conf /etc/vsftpd.conf.backup
Selanjutnya edit file vsftp.conf
# nano /etc/vsftpd.conf
Edit File seperti dibawah ini
# daemon started from an initscript.
listen=NO
# files.
listen_ipv6=YES
# Allow anonymous FTP? (Disabled by default).
anonymous_enable=NO
# Uncomment this to allow local users to log in.
local_enable=YES
# Uncomment this to enable any form of FTP write command.
write_enable=YES
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd’s)
local_umask=022
# go into a certain directory.
dirmessage_enable=YES
# option.
use_localtime=YES
# Activate logging of uploads/downloads.
xferlog_enable=YES
# Make sure PORT transfer connections originate from port 20 (ftp-data).
connect_from_port_20=YES
# chroot_list_enable below.
chroot_local_user=YES
# access.
secure_chroot_dir=/var/run/vsftpd/empty
# This string is the name of the PAM service vsftpd will use.
pam_service_name=vsftpd
# This option specifies the location of the RSA certificate to use for SSL
# encrypted connections.
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
ssl_enable=NO
# Tambahkan script ini di bawah
pasv_enable=YES
pasv_min_port=10000
pasv_max_port=10100
allow_writeable_chroot=YES
Simpan perubahan lalu restart service vsftpd
# systemctl restart vsftpd.service
Selanjutnya buat user baru untuk mengakses FTP
# useradd -m ftpuser
# passwd ftpuser
New password: masukan password
Retype new password: masukan password
passwd: password updated successfully
Untuk pengetesan jalankan perintah berikut
# ftp localhost
Connected to localhost.
220 (vsFTPd 3.0.3)
Name (localhost:kris): ftpuser
331 Please specify the password.
Password: masukan password ftpuser
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
226 Directory send OK.
ftp> exit
3. Test FTP
Pengetesan dilakukan menggunakan Filezilla dari sisi Client, Masukan IP Server lalu masukan user dan password ftpuser lalu klik Quickconnect. Jika berhasil Login akan masuk ke home direktori ftpuser
Tambahkan beberapa Folder Baru
Test Upload File ke dalam Folder Document
Test akses menggunakan Browser ftp://IP_Server masukan user dan password
Akan tampil seperti gambar dibawah ini
Comments