Setup easy and quickway FTP Server

Simple 10 Steps away to setup FTP Server on your Linux box and its Life time free !!!!

Thtats the power of Linux !

Conside you already Linux running, you like to setup FTP Server – easy and peezy !

My Environment : Ubunut Linux

Step 1 : Install vsftpd

apt-get install vsftpd

Step2 : Create a FTP User

#adduser balajibandi ( Follow the instruction in the menu) – with the password

When you Create a User it will crate user directory in /home (this where user files stores)

/home/balajibandi

Lets create a directory for ftp

mkdir /home/balajibandi/ftp
chown nobody:nogroup /home/balajibandi/ftp
chmod a-w nobody:nogroup /home/kempuser/ftp
chmod a-w /home/balajibandi/ftp
ls -al /home/balajibandi/ftp
mkdir /home/balajibandi/ftp/files
chown balajibandi:balajibandi /home/kempuser/ftp/files

Step3: edit vsftpd.conf to make it work. (my config look as below)

listen=NO
listen_ipv6=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_file=/var/log/vsftpd.log
chroot_local_user=YES
user_sub_token=$USER
local_root=/home/$USER/ftp
pasv_min_port=40000
pasv_max_port=50000
userlist_enable=YES
userlist_file=/etc/vsftpd.userlist
userlist_deny=NO
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd

step 4 : adding user to vsfdlist

echo “balajibandi” | sudo tee -a /etc/vsftpd.userlist

step 5: start the service

/etc/init.d/vsftpd start – start the service

/etc/init.d/vsftpd status – check the status

/etc/init.d/vsftpd status

● vsftpd.service – vsftpd FTP server
Loaded: loaded (/lib/systemd/system/vsftpd.service; enabled; vendor preset: enabled)
Active: active (running) since Tue XXXXXX BST; 2h 32min ago
Process: 21814 ExecStartPre=/bin/mkdir -p /var/run/vsftpd/empty (code=exited, status=0/SUCCESS)
Main PID: 21816 (vsftpd)
Tasks: 1 (limit: 4915)
CGroup: /system.slice/vsftpd.service
└─21816 /usr/sbin/vsftpd /etc/vsftpd.conf

May 0X 12:14:38 BB-SYSLOG systemd[1]: Starting vsftpd FTP server…
May 0X 12:14:38 BB-PR-SYSLOG systemd[1]: Started vsftpd FTP server.

Step 6 : check the FTP connection with user created,

Use any FTP Client and connect

Step 7: Check the Logs

CONNECT: Client “::ffff:10.18.94.19”
[kempuser] OK LOGIN: Client “::ffff:10.18.94.19”
[kempuser] OK UPLOAD: Client “::ffff:10.18.94.19”, “/files/backup_12.27”, 8686 bytes, 9932.58Kbyte/sec

Step 8 : You can do Cron Job or any email alerts

Step 9 : keep checking the folder size and do home clearning work.

Step 10 : Relax and you setup free FTP Service for Life

happy Labbbbing !!!!