Phone:+(91) 9874995307
Email: sbwebdeveloper@gmail.com
Opening: 10AM - 07PM
EC2 - FTP Account setup
  • May 01, 2023
  • 70 likes

EC2 - FTP Account setup

FTP stands for File Transfer Protocol. It is a protocol used to transfer files between an FTP host/server and an FTP client computer on the Internet. FTP is most commonly used to download files from the World Wide Web. It is an alternative choice to HTTP protocol for downloading and uploading files to FTP servers.

To create FTP account please follow the below steps:

1. First we need to have an running EC2 instance, where FTP account will be create. For that EC2 security group add below port

# TYPE PORT RANGE SOURCE
1. Custom TCP 20-21 Anywhere IPV4
2. Custom TCP 1024-1048 Anywhere IPV4

2. Go to root user by using following command

sudo -i
sudo apt-get update

3. Install requird package for FTP setup

sudo apt-get install apache2     #Install apache2 if it is not installed
sudo apt-get install vsftpd 

4. Now open the config file anf add or update below lines

nano /ect/vsftpd.conf
  • anonymous_enable=NO 
  • write_enable=YES
  • chroot_local_user=YES
  • allow_writeable_chroot=YES
  • pasv_enable=YES
  • pasv_min_port=1024
  • pasv_max_port=1048
  • pasv_address=
service vsftpd restart

5. FTP setup is done. Now we have to add new user with  specf folder permission to access it from Filzilla or anyother.

For Example:
Username    : sbdeveloper
Folder Path  : var/www/website

adduser sbdeveloper
sudo usermod -d /var/www/website -m sbdeveloper    # Give folder access permission to a specific user
chmod -R 777 /var/www/website    # Give read and write permission to that folder
chown -R sbdeveloper:www-data /var/www/website   # it will give user to a permissioned folder  and stop to access to root files
service apache2 restart

FTP account stepup is completed. Now you can use any FTP client to connect EC2 instance with given username and password.

If you find our post usefull for you, please click on like button. We will share you more commonly usefull article soon