Cannot login via FTP using FileZilla: 530 Login authentication failed

I keep getting the 530 Login authentication failed error. I can’t seem to solve it.

I tried the following:

  • Ensured port 21 is open.
  • Tried with/without the Cyberpanel firewall
  • Recreated the FTP account multiple times with different passwords to iron out user error

Error (Redacted sensitive info):

Status: Resolving address of my.website
Status: Connecting to xxx.xxx.xxx.xxx…
Status: Connection established, waiting for welcome message…
Status: Initializing TLS…
Status: TLS connection established.
Command: USER myuser
Response: 331 User myuser OK. Password required
Command: PASS *****************
Response: 530 Login authentication failed
Error: Critical error: Could not connect to server

Any help would be much appreciated.

1 Like

Welcome @Epic Happy you are here

530 Login authentication failed occurs when you are using either a wrong username, password, port or hostname

Go to https://SERVER_URL:8090/ftp/listFTPAccounts change password and confirm username

A crude workaround is go to the settings in the “Encryption” section and set “Use simple FTP” .

Also try another client see if you will find any success

FInally if all fails contact service provider to check whether you are limited to some degree see this FTP issues on DigitalOcean - #20 by ljchuello

No luck, unfortunately. I tried many times with new users, changing pass etc. The username and pass matches.

A crude workaround is go to the settings in the “Encryption” section and set “Use simple FTP” .

Where would I find this?.

FInally if all fails contact service provider to check whether they block port 20 or something else see this FTP issues on DigitalOcean - #20 by ljchuello

I can telnet my server on port 21, and it responds fine as OPEN. Also, I would have thought then I would get a different error. I am provisioning a VM on GCP and installing it on there to see if the issue persists. Will allow port 21 via the firewall.

Share https://SERVER_IP:8090/serverlogs/ftplogs

Redacted sensitive info.

Dec 7 20:48:01 localhost CRON[188058]: (root) CMD (if ! find /home/*/public_html/ -maxdepth 2 -type f -newer /usr/local/lsws/cgid -name ‘.htaccess’ -exec false {} +; then systemctl restart lsws; fi)
Dec 7 20:49:27 localhost pdns_server[40143]: Not validating response for security status update, this is a non-release version
Dec 7 20:50:28 localhost pure-ftpd: (?@149.28.48.43.vultrusercontent.com) [INFO] New connection from 149.28.48.43.vultrusercontent.com
Dec 7 20:50:29 localhost pure-ftpd: (?@149.28.48.43.vultrusercontent.com) [INFO] TLS: Enabled TLSv1.3 with TLS_AES_256_GCM_SHA384, 256 secret bits cipher
Dec 7 20:50:33 localhost pure-ftpd: (?@149.28.48.43.vultrusercontent.com) [WARNING] Authentication failed for user [someuser_ftp]

This implies it is just an auth issue but I’m not convinced it is from me. I’ve tried multiple accounts, copying and pasting the username/password etc. For some reason, I feel like the UI username/pass doesn’t match what is stored. Is there a way I can view the ACTUAL db to see the stored content isn’t corrupted.

Are you using RHEL based os

No, I’m using Ubuntu 22

@Epic

RUn this to remove pure-ftpd software package and reinstall it again just to eliminate any package and conf corruptions:

# create a snapshot of your server
# stop the service
systemctl stop pure-ftpd
# remove package and leftovers
sudo apt-get purge --auto-remove pure-ftpd
sudo apt install pure-ftpd -y
groupadd -g 2001 ftpgroup
useradd -u 2001 -s /bin/false -d /bin/null -c "pureftpd user" -g ftpgroup ftpuser
systemctl start pure-ftpd
mkdir /etc/ssl/private
openssl req -newkey rsa:1024 -new -nodes -x509 -days 3650 -subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=www.example.com" -keyout /etc/ssl/private/pure-ftpd.pem -out /etc/ssl/private/pure-ftpd.pem
rm -R /etc/pure-ftpd
mkdir /etc/pure-ftpd
cp /usr/local/CyberCP/install/pure-ftpd-one/* /etc/pure-ftpd/
systemctl restart pure-ftpd

If you get an error that Access denied for user ('cyberpanel' @ 'localhost' ... run the following command nano pureftpd-mysql.conf and change the password to correct cyberpanel user password you can find it here /usr/local/CyberCP/CyberCP/settings.py under DATABASES =

Tried that but I now get the following when trying to restart ftpd. Logs indicate:
/usr/sbin/pure-ftpd-wrapper: Couldn’t examine directory /etc/pure-ftpd/conf: No such file or directory

➜ ~ ls -la /etc/pure-ftpd/
total 32
drwxr-xr-x 2 root root 4096 Dec 7 23:00 .
drwxr-xr-x 126 root root 12288 Dec 7 23:00 …
-rw-r–r-- 1 root root 1092 Dec 7 23:01 pure-ftpd.conf
-rw-r–r-- 1 root root 2009 Dec 7 23:01 pureftpd-ldap.conf
-rw-r–r-- 1 root root 375 Dec 7 23:01 pureftpd-mysql.conf
-rw-r–r-- 1 root root 2966 Dec 7 23:01 pureftpd-pgsql.conf

Should pure-ftpd.conf be renamed?

@josephgodwinke

Fixed by not deleting the ftpd dir but just overwriting the files from CP. However, still no luck even with a new user and pass, only difference I see in FileZilla is: Status: Insecure server, it does not support FTP over TLS.

Only other thing I can think of is that I haven’t updated the DNS for the “website” yet. Does that matter?. It shouldn’t do?. I am connecting Host via FileZilla directly via the IP and not the domain name anyway.

Or possibly because I am using Ubuntu 22. The install only says up to Ubuntu 20. Ya looks like Ubuntu 22 is not support as Stable release yet. CyberPanel support for Ubuntu 22

I will see if Ubuntu 20 works without any issues.

Ok but any idea of what to do to fix it? Reinstall PureFTP? That’s it?

@villasweb @Epic sorry to hear you have issues with authentication.

530 Login authentication failed error on cyberpanel seems to always be a password database corruption.

Yes you have to reinstall although it should work on ubuntu 20 new installation without any issues.

However, the only way to fix this is reinstall pureftpd or install CyberPanel without ftp.

Run this to remove pure-ftpd software package and reinstall it again just to eliminate any package and conf corruptions:

# create a snapshot of your server
# stop the service
systemctl stop pure-ftpd
# remove package and leftovers
sudo apt-get remove --purge pure-ftpd pure-ftpd-common
sudo apt autoremove
sudo killall -u ftpuser
sudo userdel -f ftpuser
sudo groupdel ftpgroup
sudo apt install pure-ftpd -y
groupadd -g 2001 ftpgroup
useradd -u 2001 -s /bin/false -d /bin/null -c "pureftpd user" -g ftpgroup ftpuser
systemctl start pure-ftpd
mkdir /etc/ssl/private
openssl req -newkey rsa:1024 -new -nodes -x509 -days 3650 -subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=www.example.com" -keyout /etc/ssl/private/pure-ftpd.pem -out /etc/ssl/private/pure-ftpd.pem
rm -R /etc/pure-ftpd
mkdir /etc/pure-ftpd
cp /usr/local/CyberCP/install/pure-ftpd-one/* /etc/pure-ftpd/
systemctl restart pure-ftpd

If you get an error that Access denied for user ('cyberpanel' @ 'localhost' ... run the following command nano pureftpd-mysql.conf and change the password to correct cyberpanel user password you can find it here /usr/local/CyberCP/CyberCP/settings.py under DATABASES =

OR

sudo service pure-ftpd stop
sudo apt-get autoremove pure-ftpd
sudo apt-get purge pure-ftpd
sudo rm -r /etc/pure-ftpd
sudo killall -u ftpuser
sudo userdel -f ftpuser
sudo groupdel ftpgroup
sh <(curl https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh || wget -O - https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh)

OR

Just install vsftp for a secure ftp if you dont care about managing users on a dashboard

sh <(curl https://raw.githubusercontent.com/josephgodwinkimani/cyberpanel-mods/main/install_vsftpd.sh || wget -O - https://raw.githubusercontent.com/josephgodwinkimani/cyberpanel-mods/main/install_vsftpd.sh)

You will access ftp with user ftpuser and the password you create during the process. This user will access /home/

You can create other users by running:

# usercreatedoncyberP managed mydomain.com
sudo usermod -d /home/mydomain.com usercreatedoncyberP
sudo chown usercreatedoncyberP:usercreatedoncyberP /home/mydomain.com/public_html

I use this method on several servers with similar issues in the past and it works. Good luck