ftp error `530 Permission denied` on Redhat Linux System

0

I am using right username still I'm getting the below error on my Redhat Server:

[root@server2 log]# ftp localhost
Connected to localhost.localdomain.
220 (vsFTPd 2.0.5)
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Name (localhost:root): root
530 Permission denied.
Login failed.

It is not giving the password prompt at all. My vsftpd service is running perfectly fine. I restarted it couple of times, but still the same.

I enabled /var/log/xferlog and /var/log/vsftpd.log to check for any potential error, but of no help.

Can somebody help me debug the issue.

dig_123

Posted 2013-11-26T18:24:58.177

Reputation: 466

Can you log in correctly with your normal user? – terdon – 2013-11-26T18:26:28.510

@terdon Yes, I'm actually trying it as root user, and normal ssh to the server is happening as usual. Normal sftp is also happening using same username and password – dig_123 – 2013-11-26T18:29:29.450

Answers

1

You should never connect as root over FTP. It is an old and insecure protocol and there really is no reason why you would want to use it as root. Look into ssh or sftp as alternatives.

That said, if you really want to open this huge security hole, you will need to edit your /etc/vsftpd.conf file and add or uncomment this line:

 local_enable=YES

I really cannot stress enough that you don't want to do this. FTP does not encrypt passwords, allowing this will send your root password unencrypted over the network. That is A Bad Idea. Please use sftp instead.

terdon

Posted 2013-11-26T18:24:58.177

Reputation: 45 216

1This is already uncommented.

anonymous_enable=YES

local_enable=YES

write_enable=YES – dig_123 – 2013-11-26T18:44:56.587

2

@Siddharth please [edit] your question to add extra info, it is hard to read and easy to miss in the comments. Anyway, seriously, don't do this, it is extremely unsafe and there is no valid reason why you would need it. That repeated, see here, do you have a user_listoption in yourvsftpd.conf? Do you have avsftpd.users` file? This really sounds like an XY problem, why do you want to allow root to login via FTP?

– terdon – 2013-11-26T18:51:03.480

I completely understand your point regarding the security part. But I just wanted to check which configurations are actually causing the ftp service to not work( on my test system). Coming back to the issue: i don't have any vsftp.users file, but I have a parameter userlist_enable=YES in the configuration file. But I don't think it should affect as I don't have the users file. Also I don't have any firewall blocking port 21. – dig_123 – 2013-11-26T19:45:23.357

@torden : Also I see a parameter connect_from_port_20=YES in the vsftpd.conf file, but my /etc/services says ftp port to be 21. Is that causing a problem ? – dig_123 – 2013-11-26T19:49:12.173

@Siddharth it is not a firewall issue, root login is disabled by all sane FTP servers because it is so pointless and dangerous, onbody ever connects as root over FTP. It is also not a port issue since you can connect as a normal user. If you have the userlist_enable option, you have a userlist somewhere. Read the article I linked to in my previous comment, it suggests possible locations for the file. – terdon – 2013-11-26T19:50:49.110