On our Debian VPS servers, we run ProFTPD in order to enable client FTP access. These servers are all managed via SSH, and so very occasionally when setting up a new account I run into a 530 error: Login incorrect. You just can’t get past it though, no matter how many variants you try on the password you thought you entered.
The most obvious thing to check is the password. Is it correct?
Reset FTP User Password
If you aren’t 100% sure what password you created, you can reset the FTP users password with the command:
sudo passwd username
Replacing username with the username of your FTP account. This will output something like the below:
[sudo] password for root:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Note that the first line will show the username of your sudo account – in this example it is root, but yours could be something different. You want to enter the password for this sudo account here, after that it will allow you to enter a new password for the account you are trying to reset.
Check FTP User Groups
If this doesn’t solve the 530 FTP Login Incorrect error I find that the next most likely problem is that I’ve forgotten to add the user account to the FTP group. This mistake isn’t so obvious from the error message though. An FTP group is normally created when you setup ProFTPD and only users belonging to this group are allowed to login via FTP.
To troubleshoot this, check what groups the user belongs to:
Replace username with the account username you are checking.
If the user has not been added to any other groups, you should get a response that looks something like:
username : username
The first word before the : is the account username, the one after the : is the primary group that the user belongs to. When they are first created, they are added to their own group.
If the user belongs to more than one group, the secondary groups will follow the primary group, separated by spaces.
Add The FTP Group To A User
In order to add the missing group, run the below command, replacing ftpuser with your FTP group name and username with the username of the FTP account:
sudo usermod -a -G ftpuser username
Now if you run:
You should see something like:
username : username ftpuser
I find that these two simple troubleshooting tips solve the 530 Login Incorrect error almost all the time, I hope that helps!