How to setup FTP server on ubuntu 14.04 ( VSFTPD )
FTP is used to transfer files from one host to another over TCP network. This article explains how to setup FTP server on ubuntu 14.04 on our local server.
STEP 1:Update repositories.
STEP 2: Install VsFTPD package using the below command.
STEP 3 : After installation open /etc/vsftpd.conf file and make changes as follows.
Add the following lines to enable passive mode.
STEP 4 : Restart vsftpd service using the below command
STEP 5 : Now ftp server will listen on port 21. Create user with the below command.Use /usr/sbin/nologin shell to prevent access to the bash shell for the ftp users .
STEP 6 : Allow login access for nologin shell . Open /etc/shells and add the following line at the end.
STEP 7 : Now test ftp
STEP 1:Update repositories.
sudo apt-get update
STEP 2: Install VsFTPD package using the below command.
sudo apt-get install vsftpd
STEP 3 : After installation open /etc/vsftpd.conf file and make changes as follows.
write_enable=YES local_umask=022 below line [line no: 120] chroot_local_user=YES local_enable=YES pam_service_name=vsftpd userlist_enable=YES listen=YES tcp_wrappers=YES //set default directory which you want enable on ftp local_root=/opt //write the below line at the end allow_writeable_chroot=YES
Add the following lines to enable passive mode.
pasv_enable=Yes pasv_min_port=40000 pasv_max_port=40100
STEP 4 : Restart vsftpd service using the below command
sudo service vsftpd restart
STEP 5 : Now ftp server will listen on port 21. Create user with the below command.Use /usr/sbin/nologin shell to prevent access to the bash shell for the ftp users .
sudo useradd -m Krishna -s /usr/sbin/nologin sudo passwd Krishna
STEP 6 : Allow login access for nologin shell . Open /etc/shells and add the following line at the end.
/usr/sbin/nologin
STEP 7 : Now test ftp
host : Your host eg.192.168.0.15 user : Krishna password : Krishna
No comments: