LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   ftp login failure (https://www.linuxquestions.org/questions/linux-server-73/ftp-login-failure-4175503091/)

wwipro 04-26-2014 04:51 PM

ftp login failure
 
Our client uses ftp to access the RedHat box. All gets login failure.
Reason to user ftp? Client’s application requests it.
$ ftp urh04
Connected to urh04.
220 (vsFTPd 2.0.5)
Name (urh04:mytest):
331 Please specify the password.
Password:
530 Login incorrect.
Login failed.
ftp> quit
221 Goodbye.

Here is /etc/vsftpd/vsftpd.conf :
anon_world_readable_only=NO
anonymous_enable=NO
chroot_list_enable=YES
chroot_local_user=YES
guest_enable=NO
guest_username=ftp
hide_ids=YES
listen=YES
listen_address=12.13.14.15
listen_port=2121
local_enable=YES
max_clients=100
dual_log_enable=YES
max_per_ip=10
nopriv_user=ftp
pam_service_name=ftp
pasv_max_port=65535
pasv_min_port=64000
session_support=NO
use_localtime=YES
user_config_dir=/etc/vsftpd/users
userlist_enable=YES
userlist_file=/etc/vsftpd/denied_users
xferlog_enable=YES
anon_umask=027
local_umask=006
async_abor_enable=YES
connect_from_port_20=YES
dirlist_enable=NO
#dirlist_enable=YES
download_enable=NO
# tep, added the following
xferlog_std_format=YES
log_ftp_protocol=NO
pasv_enable=YES
pasv_address=216.157.3.2
#port_enable=YES
port_enable=NO
pasv_addr_resolve=YES
#
# TLS Configuration
#
ssl_enable=YES
allow_anon_ssl=NO
force_local_data_ssl=NO
force_local_logins_ssl=YES
ssl_tlsv1=YES
ssl_sslv2=NO
ssl_sslv3=NO
rsa_cert_file=/etc/pki/tls/certs/vsftpd.pem

I also tried to set pam_service_name=vsftpd. That does not help.
O/S: Red Hat Enterprise Linux Server release 5.3
2.6.18-128.1.6.el5

Thanks.

wwipro 04-26-2014 11:36 PM

i change vxftpd.conf and vsftpd21.conf's entry "pam_service_name=ftp" to "pam_service_name=vsftpd. ftp accepts password and proceeds to login.
> ftp urh04
Connected to urh04.
220 (vsFTPd 2.0.5)
Name (ld-qq-u-rh-4:mytest):
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> pwd
257 "/"
ftp> ls
200 PORT command successful. Consider using PASV.
550 Permission denied.

On urh04, user account mytest's home directory is /home/mytest.

ericson007 04-27-2014 01:33 AM

The 550 looks like it is likely to do with file or folder permissions, alternatively selinux is blocking access.

wwipro 04-27-2014 03:53 PM

Which directory mytest ftp/log into?
Thanks.

eklavya 04-28-2014 12:16 AM

It is the chroot directory, where you want to the user should be jailed and should not access to it's parent directory.
550 means, you do not have sufficient permission and SELINUX may be the reason.
You can check it, just disable the selinux for a moment and try if your job is successful.
If you are confirmed that selinux is blocking it, it is NOT good at all to disable selinux.

You have to remove the error without disabling it.
Try following commands
Quote:

# chcon -t public_content_rw_t /path/of/ftp/directory
# setsebool -P allow_ftpd_anon_write=1

ericson007 04-28-2014 02:18 AM

Also if you are trying to get to home directories, there may be a boolean for that. Will check back soon.

ericson007 04-28-2014 08:27 AM

http://www.linuxquestions.org/questi...elinux-449313/

And

https://access.redhat.com/site/docum..._Protocol.html

wwipro 04-29-2014 11:03 PM

thanks for all recommendations.
The culprit was corrupted files on /etc/vsftpd/ directory. I first noticed ftpusers file has right size. But when i open it up (cat it), nothing but 2 blank lines. I ended up to restored the /etc/vsftpd/ directory.
This server went down hard due to hardware problem. I have found several corrupted files.
Thanks.


All times are GMT -5. The time now is 04:28 PM.