Hi Guys,
I have setup vsftpd on my redhat rel 5 server and I can logon with a regular userid that I created, but when I create a user using the following script, it gives me "ftp 500 OOPS: cannot change directory" when I try to logon.
if [ -z $1 ]
then
echo Usage: $0 user_name passwd
exit 1
fi
if [ -e /home/ftp/jail/$1 ]
then
echo User already exists, delete user first
exit 1
fi
/usr/sbin/useradd -d /home/ftp/jail/$1 -s /dev/null -g ftp-users -m -k /home/ftp/skel $1
#mkdir /home/ftp/jail/$1
mkdir /home/ftp/jail/$1/in
mkdir /home/ftp/jail/$1/out
chown -R $1:ftp-users /home/ftp/jail/$1
echo $1 >> /etc/vsftpd.chroot_list
expect /home/ftp/scripts/changepass $1 $2
When I ftp -->
[root@wueild01 scripts]# ftp localhost
Connected to localhost.localdomain.
220 (vsFTPd 2.0.1)
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Name (localhost
csoper): testuser
331 Please specify the password.
Password:
500 OOPS: cannot change directory:/home/ftp/jail/testuser
Login failed.
ftp>
I have chmod 777 all the dir and subdirs for these users, but still cant get in.
When I create a user without any options it can access ftp (log below), the aforesaid users still fail with that error.
-------
[root@wueild01 scripts]# /usr/sbin/useradd test
[root@wueild01 scripts]# passwd test
Changing password for user test.
New UNIX password:
BAD PASSWORD: it is too short
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@wueild01 scripts]# ftp localhost
Connected to localhost.localdomain.
220 (vsFTPd 2.0.1)
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Name (localhost
csoper): test
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
227 Entering Passive Mode (127,0,0,1,200,141)
150 Here comes the directory listing.
226 Directory send OK.
ftp> pwd
257 "/"
ftp> cd ..
250 Directory successfully changed.
ftp> ls
227 Entering Passive Mode (127,0,0,1,230,198)
150 Here comes the directory listing.
226 Directory send OK.
ftp>
-------
Can somebody help!!!!