Bug 412451

Summary: first time ftp user gets an error message:500 OOPS: cannot change directory:
Product: Red Hat Enterprise Linux 5 Reporter: David Ng <dng>
Component: autofsAssignee: Jeff Moyer <jmoyer>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: 5.0CC: ikent, mwaite
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-12-10 18:13:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Ng 2007-12-05 17:18:37 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; InfoPath.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)

Description of problem:
First time ftp user will get an error message:
# ftp harn6-lnx
        Connected to harn6-lnx.actuate.com.
        220 (vsFTPd 2.0.5)
        Name (harn6-lnx:root): dng
        331 Please specify the password.
        Password:
        500 OOPS: cannot change directory:/home/dng
        Login failed.
        ftp> quit


Note that we have an NFS, NIS automount environment.  Users' homedirectories are automounted.  It seems vsftpd triggers a mount to the directory and automountd does mounted the directory.  Therefore, the user can login the second time.

All latest patches are applied to this machine as of 11/28/2007 via yum update.

Version-Release number of selected component (if applicable):
vsftpd-2.0.5-10.el5

How reproducible:
Always


Steps to Reproduce:
1. make sure user home directory is not mounted
2. ftp into the machine as this user, the error message is displayed
3. after the failure, ftp into the machine again and it will work.

Actual Results:
AS described above.

Expected Results:
ftp should work the first time.

Additional info:

Comment 1 Michael Waite 2007-12-05 20:55:17 UTC
can you clarify where you are getting the patches for the system? Are they Red
Hat patches? Wanted to ask seeing as you are using Yum as opposed to the rhn client.

Comment 2 David Ng 2007-12-05 21:48:36 UTC
redhat update done via: yum update without any options.  It has prompt me to 
use rhn_register and then run yum update again.

Comment 3 Martin Nagy 2007-12-07 07:45:36 UTC
This is almost certainly not a vsftpd bug. I'm not familiar much with the
automount, but I think this might be caused either by misconfiguration or a bug
in the automount. All vsftpd is trying to do is to change working directory, by
calling a standard system call, which, apparently, returns an error.
Could you try to log on the machine and try to use the cd command on some
directory that is not mounted and post the results here?

Comment 4 David Ng 2007-12-07 17:17:44 UTC
$ id
uid=1234(dng) gid=1006(engsvc) groups=1006(engsvc)
$ mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
esfs3-lnx.actuate.com:/actu02/work/clnqa on /home/clnqa type nfs 
(rw,nosuid,hard,intr,retry=128,addr=192.168.30.170)
esfs3-lnx.actuate.com:/actu01/home/dng on /home/dng type nfs 
(rw,nosuid,hard,intr,retry=128,addr=192.168.30.170)
$ cd /home/dlai
-ksh: cd: /home/dlai: [No such file or directory]
$ cd /home/dlai
$ ls


The above is the result.  It seems cd fails the first time just like ftp.  It 
is not a vsftpd issue but rather a cd/automount issue.  How should I process 
from this point on??

Comment 5 Martin Nagy 2007-12-10 11:04:26 UTC
Changing component to autofs as this is not a vsftpd problem.

Comment 6 Jeff Moyer 2007-12-10 15:15:30 UTC
What kernel veresion?  This is most likely a duplicate of bug 381071.

Comment 7 David Ng 2007-12-10 17:55:10 UTC
[root@harn6-lnx ~]# uname -a
Linux harn6-lnx 2.6.18-53.el5 #1 SMP Wed Oct 10 16:34:02 EDT 2007 i686 i686 
i386 GNU/Linux



Comment 8 Jeff Moyer 2007-12-10 18:13:13 UTC
Fixed in erratum RHSA-2007-0993.

*** This bug has been marked as a duplicate of 381071 ***