Operating System - Linux
1752577 Members
4911 Online
108788 Solutions
New Discussion юеВ

FC 5 vsftpd login to users local directory

 
Vernon Brown_4
Trusted Contributor

FC 5 vsftpd login to users local directory

I'm having a tough time configuring vsftpd.conf to allow local users to login. I keep getting error message:
500:OOPS can't change dir to /home/localuser
login failed

where localusr is a valid user name on the system.

Anybody have a clue ???
10 REPLIES 10
Barry Lowe
Advisor

Re: FC 5 vsftpd login to users local directory

Can you attach your vsftpd.conf?
Steven E. Protter
Exalted Contributor

Re: FC 5 vsftpd login to users local directory

Shalom Vernon,

Places to check:

home directory from /etc/passwd

permissions on home directory.

/var/log/messages

service vsfptd status.

As Barry notes, it would be helpful to see the conf file.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Vernon Brown_4
Trusted Contributor

Re: FC 5 vsftpd login to users local directory

Thanks for your response guys !!

/var/log/messages has this entry each time the ftp login is attempted. I can't get the actual file without physically going to the server. I'll do that and post it later.



Jun 8 12:21:31 veb kernel: audit(1149787291.125:368): avc: denied { search } for pid=5219 comm="vsftpd" name="/" dev=hdb1 ino=2 scontext=user_u:system_r:ftpd_t:s0 tcontext=system_u:object_r:home_root_t:s0 tclass=dir
[root@veb log]#
Vernon Brown_4
Trusted Contributor

Re: FC 5 vsftpd login to users local directory

I'm on the server now; I'll try to attach the vsftpd.conf file. I've been trying various things all day so something could be amiss there.
Vernon Brown_4
Trusted Contributor

Re: FC 5 vsftpd login to users local directory

Now I'm not sure the problem is with the vsftpd.conf file. I just moved the vsftpd.conf file that is working from an older Fedora Core 4 system that this FC 5 system is replacing.

The same error happens when using the old vsftpd.conf file.
Steven E. Protter
Exalted Contributor

Re: FC 5 vsftpd login to users local directory

Here is a working configuration.

http://www.hpux.ws/vsftpd.conf

I would first suggest commenting out anonymous in yours just for grins.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Vernon Brown_4
Trusted Contributor

Re: FC 5 vsftpd login to users local directory

Thanks Steven; I'll try your working one. I already tried one of mine that works on another system. The only thing I can think that I did different is that I put /home on a different physical drive ie hdb than the root / file system which is on hda.

Now; how to move /home to test that ??
Vernon Brown_4
Trusted Contributor

Re: FC 5 vsftpd login to users local directory

Hi Steven; I moved the vsftpd.conf from your link to /etc/vsftpd/vsftpd.conf then restarted service vsftpd restart tried to login; same result:

331 Please specify the password.
Password:
500 OOPS: cannot change directory:/home/veb
Login failed.
421 Service not available, remote server has closed connection
ftp>

Tail of /var/log/messages shows:

Jun 8 16:05:05 veb kernel: audit(1149800705.483:382): avc: denied { search } for pid=7350 comm="vsftpd" name="/" dev=hdb1 ino=2 scontext=user_u:system_r:ftpd_t:s0 tcontext=system_u:object_r:home_root_t:s0 tclass=dir

Makes me think the problem may be related to /home not being on the same drive with /

Thanks for your efforts !!

Vernon Brown_4
Trusted Contributor

Re: FC 5 vsftpd login to users local directory

The file system looks like this:

[veb@veb ~]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda2 72G 3.4G 65G 5% /
/dev/hda1 101M 14M 82M 15% /boot
tmpfs 252M 0 252M 0% /dev/shm
/dev/hdb1 18G 264M 17G 2% /home
/dev/hdb2 18G 799M 17G 5% /var
[veb@veb ~]$


I think I need to move the /home directory onto hda2 with the /root directory ??