Categories
DevOps

Add FTP User on AWS EC2 Instance

1. Enable Password Authentication

1.1. Update “PasswordAuthentication:yes” in sshd_config

sudo vi /etc/ssh/sshd_config

1.2. Assign password to main user

sudo passwd [USERNAME] # for ec2 its ubuntu

1.3. Restart sshd service

sudo service sshd restart

2. Configure vsftpd to allow access

2.1. sudo vi /etc/vsftpd.conf and adds following

listen=YES
listen_ipv6=NO
write_enable=YES
allow_writeable_chroot=YES

2.2. Restart vsftpd service

sudo service vsftpd restart

Now you should be able to login from main user by using host, username and password.

3. Add new FTP User and Setup Access

adduser [NEW_USERNAME]

# set user home directory - if needed
sudo usermod -d [LOCATION][NEW_USERNAME]

# give group permissions - if needed
usermod -a -G [GROUP_NAME] [NEW_USERNAME]

# restart service
sudo systemctl restart vsftpd

Now you should also be able to login with this new FTP user.