In vsftpd, You may get the below error while trying to connect FTP.
Response: 530 Permission denied.
Error: Could not connect to server
First you need to check below files
1. /etc/vsftpd/ftpusers
2. /etc/vsftpd/vsftpd.conf
3. /etc/vsftpd/user_list
If a user name is present in the "ftpusers" file, then the user is not allowed to login via ftp.
So, we need to remove the ftpusername from the "/etc/vsftpd/ftpusers" file.
Open the vsftpd configuration file "/etc/vsftpd/vsftpd.conf file" and search for "userlist_deny="
If there is no such "userlist_deny=" , then add it to the "/etc/vsftpd/vsftpd.conf" file.
If "userlist_deny=NO", only allow users in the file "/etc/vsftpd/user_list".
If "userlist_deny=YES" (default), never allow users in this file, and do not even prompt for a password.
[root@test ~]# cat /etc/vsftpd/user_list
# vsftpd userlist
# If userlist_deny=NO, only allow users in this file
# If userlist_deny=YES (default), never allow users in this file, and
# do not even prompt for a password.
# Note that the default vsftpd pam config also checks /etc/vsftpd/ftpusers
# for users that are denied.
Once you edited the configuration file, you need to restart the service.
[root@test ~]# /etc/init.d/vsftpd restart
Shutting down vsftpd: [ OK ]
Starting vsftpd for vsftpd: [ OK ]
Response: 530 Permission denied.
Error: Could not connect to server
First you need to check below files
1. /etc/vsftpd/ftpusers
2. /etc/vsftpd/vsftpd.conf
3. /etc/vsftpd/user_list
If a user name is present in the "ftpusers" file, then the user is not allowed to login via ftp.
So, we need to remove the ftpusername from the "/etc/vsftpd/ftpusers" file.
Open the vsftpd configuration file "/etc/vsftpd/vsftpd.conf file" and search for "userlist_deny="
If there is no such "userlist_deny=" , then add it to the "/etc/vsftpd/vsftpd.conf" file.
If "userlist_deny=NO", only allow users in the file "/etc/vsftpd/user_list".
If "userlist_deny=YES" (default), never allow users in this file, and do not even prompt for a password.
[root@test ~]# cat /etc/vsftpd/user_list
# vsftpd userlist
# If userlist_deny=NO, only allow users in this file
# If userlist_deny=YES (default), never allow users in this file, and
# do not even prompt for a password.
# Note that the default vsftpd pam config also checks /etc/vsftpd/ftpusers
# for users that are denied.
Once you edited the configuration file, you need to restart the service.
[root@test ~]# /etc/init.d/vsftpd restart
Shutting down vsftpd: [ OK ]
Starting vsftpd for vsftpd: [ OK ]