1-step: install vsftpd
sudo apt-get install vsftpd
2-step: configure the vsftpd
2-1: make a backup
cd /etc/
sudo cp vsftpd.conf vsftpd.conf.old
2-2: change the .conf
sudo gedit vsftpd.conf
1. Allow anonymous FTP? (Disabled by default)----OF COURSE NO !!!
anonymous_enable=NO
2. Add the line: (Locate the FTP-file which will be shared)
local_root=/home/Killse/Public/FTP-share
3.For the local--test
local_enable=YES
4.Only the ubuntu user can get service
#chroot_local_user=YES
chroot_list_enable=YES
# (default follows)
chroot_list_file=/etc/vsftpd.chroot_list
3-step: Make a list for FTP-user
sudo gedit /etc/vsftpd.chroot_list
add your linux user name in it:(my name is Killse)
Killse
4-step: the current linux user can't have the FTP-share's -W
sudo chown -R root:root /home/Killse/Public/FTP-share
cd /home/killse/Public/FTP-share
sudo mkdir FTPFILES
sudo chown -R killse:root FTPFILES
5-step: Do not let the FTP-service start with your linux startup
5-1: make a .conf backup
cd /etc/init/
sudo cp vsftpd.conf vsftpd.conf.old
5-2: configure the .conf
sudo gedit /etc/init/vsftpd.conf
#start on runlevel [2345] or net-device-up IFACE!=lo
start on runlevel [345]
stop on runlevel [!2345]
6-step: Restart the FTP-service
sudo service vsftpd restart
[Other command]:stop the FTP-service: sudo service vsftpd stop