LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 11-18-2003, 11:00 AM   #1
mr_r
LQ Newbie
 
Registered: Aug 2003
Location: London, UK
Distribution: Suse 10.1, Centos 4.3, Fedora Core 4 / 5
Posts: 22

Rep: Reputation: 15
NEWBIE: Why does my vsftpd hang when I log in using virtual users?


I'm using RedHat 9 and trying to get vsftpd to work with virtual users.

I've followed the documentation in the EXAMPLE directory on vsftpd.beasts.org

This is what I have tried;

1) logins.txt:
tom
foo
fred
bar

2) Make login.db
db_load -T -t hash -f logins.txt /etc/vsftpd/vsftpd_login.db

3)Modify the file's permission:
chmod 600 /etc/vsftpd/vsftpd_login.db

4)Create a PAM file which uses your new database
/etc/pam.d/ftp:

auth required /lib/security/pam_userdb.so db=/etc/vsftpd_login
account required /lib/security/pam_userdb.so db=/etc/vsftpd_login

5)Set up the location of the files for the virtual users:
useradd -d /home/ftpsite virtual
ls -ld /home/ftpsite
(which should give):
drwx------ 3 virtual virtual 4096 Jul 30 00:39 /home/ftpsite

6)Create /etc/vsftpd/vsftpd.conf config file:

anonymous_enable=NO
local_enable=YES
write_enable=NO
anon_upload_enable=NO
anon_mkdir_write_enable=NO
anon_other_write_enable=NO
chroot_local_user=YES
guest_enable=YES
guest_username=virtual
listen=YES
listen_port=10021
pasv_min_port=30000
pasv_max_port=30999

7) start the daemon:
vsftpd /etc/vsftpd/vsftpd.conf &

8)ftp localhost 10021

Connected to localhost (127.0.0.1).
220 (vsFTPd 1.2.1)
Name (localhost:root): tom
331 Please specify the password.
Password: (not shown but I use 'foo' here)

at this point it just hangs sitting there doing nothing and then after a couple of minutes or so returns the following;

421 Timeout.
Login failed.
No control connection for command: No such file or directory

So I set this option in vsftpd.conf
anonymous_enable=YES
and try to log in using
userid: ftp
pw: guestftp

and it all works fine as follows;

Connected to localhost (127.0.0.1).
220 (vsFTPd 1.2.1)
Name (localhost:root): ftp
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,118,249)
150 Here comes the directory listing.
drwxr-xr-x 2 0 0 4096 Feb 28 2003 pub
226 Directory send OK.
ftp> close

can anyone help? I have looked in /var/log/messages and theres no error in there and i've looked for /var/log/vsftpd.log and that is empty.

I'm a linux newbie (only a few months) but I have been using other operating systems for many years.

Any help would be greatly appreciated.

Pete
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
vsftpd, web uploads, vsftpd virtual users, apache virtual hosts, home directories jerryasher Linux - Software 7 02-18-2007 06:29 AM
vsftpd and virtual users chrull Linux - Software 0 05-14-2004 05:09 PM
vsftpd and virtual users poweroff Linux - General 0 02-26-2004 07:04 AM
vsftpd and virtual users JeffV Linux - Software 2 11-14-2003 09:47 AM
Installation vsftpd - Virtual Users Yoss Linux - Networking 7 07-11-2003 03:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 01:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration