0

I have recently moved to lightsail from Godaddy and have some legacy ftp accounts that I need to be maintain, all the ftp account are email addresses associated with the domain name. I have created a separate instance to cater for FTP.

  1. On DNS settings ftptest.domain-name.com is pointing to the IP of the instance.
  2. On lightsail firewall for the instance I removed http access and added ports for the ftp.
  3. Edited /etc/sysconfig/network to

NETWORKING=yes

HOSTNAME=domain-name

DOMAINNAME=domain-name.com

NOZEROCONF=yes

  1. Edited /etc/hosts to

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4

::1 localhost6 localhost6.localdomain6

3x.xx.xx.1x0 ftptest.domain-name.com ftptest

  1. I installed FTP server on the instance (vsftpd: version 2.2.2).
  2. Created a new user called test and gave it a password.
  3. Tried to login via Filezilla using test@domain-name.com and failed with

Response: 530 Login incorrect.

  1. tried to login as test and was successful.

How do I make it so that I can use test@domain-name.com to login using FTP? The old server which had cpanel did this and I need the same functionality.

Edit 1: I do not get what you mean by 'usernames should include the domain name in themselves" and "@domain.com as part of the account"? I you mean create user with domain included, I get this when I try that:

sudo useradd test1@domain-name.com

useradd: invalid user name 'test1@domain-name.com'

Waqas Tariq
  • 135
  • 1
  • 1
  • 11
  • 1
    My guess is that your usernames should include the domain name in themselves. – Tero Kilkanen Apr 16 '17 at 12:11
  • 1
    Like Tero my guess is also to have the @domain.com as part of the account. I have a tutorial on adding ftp users to an Amazon Linux instance [here](https://www.photographerstechsupport.com/tutorials/aws-allow-ssh-sftp-access-server/). – Tim Apr 17 '17 at 01:34
  • I do not get what you mean by 'usernames should include the domain name in themselves" and "@domain.com as part of the account"? I you mean create user with domain included, I get this when I try that: sudo useradd test1@domain-name.com useradd: invalid user name 'test1@domain-name.com' – Waqas Tariq Apr 17 '17 at 03:02

1 Answers1

0

I was able to find a solution on my own. What I needed was to install PureFTP and not vsftpd. Since Amazon Linux does not support PureFTP I had to spin up a Ubuntu instance. PureFTP allows creation of virtual users and that is what helped me create a user with @domain-name.com.

Waqas Tariq
  • 135
  • 1
  • 1
  • 11