Operating System - Linux
1821588 Members
3634 Online
109633 Solutions
New Discussion юеВ

Login problem with vsftpd

 
SOLVED
Go to solution
Vernon Brown_4
Trusted Contributor

Login problem with vsftpd

Fedora core 6 running on two boxes one named vebnew and the other veb2. Both are
on a new LAN using a router as a LAN hub and as a gateway.

I have an old LAN network .local configured the same. It's been working
for a couple of years with no vsftp problems.

The new local2 network is set in /etc/hosts of the new server vebnew.

192.168.1.20 router.local2 router
192.168.1.21 vebnew.local2 vebnew
192.168.1.22 veb2.local veb2

named is not running on vebnew.

When I try to connect from either box to the other via vsftpd I get
this kind of error:

Connected to vebnew.local2.
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 (vebnew:veb): veb
331 Please specify the password.
Password:
500 OOPS: cannot change directory:/home/veb
Login failed.

--------
The most recent entries in /var/log/messages:

Dec 13 12:57:10 veb2 restorecond: Will not restore a file with more than one hard link (/etc/resolv.conf) No such file or directory
Dec 13 13:08:11 veb2 kernel: audit(1166036891.012:8): avc: denied { search } for pid=7460 comm="vsftpd" name="home" dev=dm-0 ino=5570561 scontext=user_u:system_r:ftpd_t:s0 tcontext=system_u:object_r:home_root_t:s0 tclass=dir

---------
The resolv.conf file seems to be Ok and works for ssh.

# cat /etc/resolv.conf
; generated by /sbin/dhclient-script
nameserver 192.168.1.20

------------------------------------------

I have another LAN with a server named veb.local that both
vebnew.local and veb2.local have no problem connecting to via vsftpd.

named is running on this server but vsftpd works Ok even when named is not running.


I've checked /etc/vsftpd/vsftpd.conf and it looks the same on both servers.

Any ideas ?? Thanks !
8 REPLIES 8
Ivan Krastev
Honored Contributor

Re: Login problem with vsftpd

If you have selinux installed try:

setsebool ftpd_disable_trans 1
service vsftpd restart



regards,
ivan
Vernon Brown_4
Trusted Contributor

Re: Login problem with vsftpd

[root@vebnew veb]# setsebool ftpd_disable_trans 1
bash: setsebool: command not found

I'm not sure if selinux is running; ps -A | grep linux returns nothing, but I don't remember the process name of selinux. Fedora core 6 is running right out of the box.
George Liu_4
Trusted Contributor

Re: Login problem with vsftpd

getenforce will show if selinux is enabled
Vernon Brown_4
Trusted Contributor

Re: Login problem with vsftpd

[root@veb2 veb]# getenforce
bash: getenforce: command not found
[root@veb2 veb]#

I'm not familiar with getenforce ? How to run it.

Ivan Krastev
Honored Contributor

Re: Login problem with vsftpd

Here is lots of info about selinux - http://fedora.redhat.com/docs/selinux-faq-fc3/


ivan
Vernon Brown_4
Trusted Contributor

Re: Login problem with vsftpd

[veb@veb2 ~]$ sestatus
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: enforcing
Mode from config file: enforcing
Policy version: 21
Policy from config file: targeted


Ok with that link I found sestatus command and it shows selinux enabled. If I can figure out how to temporarily disable it I can determine if it is the cause of the login failure.
Ivan Krastev
Honored Contributor
Solution

Re: Login problem with vsftpd

You can disable SELinux protection for the ftpd daemon by executing:
/usr/sbin/setsebool -P ftpd_disable_trans 1
service vsftpd restart

Another option is "system-config-securitylevel" - GUI tool available to customize SELinux policy settings.

ivan
Vernon Brown_4
Trusted Contributor

Re: Login problem with vsftpd

Thanks Ivan; that fixed it !!

We would have had it sooner but /usr/sbin was not in my path and I didn't realize it.

Thanks again everybody !!