Home > Archive > Linux/Unix > August 2004 > vsftpd Problem





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author vsftpd Problem
sacredcowpaddy

2004-06-30, 2:46 pm

For the past two days, I have been trying to get vsftpd set up on my Fedora system. I am about to give upon it as I am having no success. I have vsftpd running as a subservice of xinetd, but when I attempt to connect to the ftp port (firewall has the ports open) either locally or remotely, I get a "connection refused" error. I suspect that xinetd is not spawning an ftp daemon in response to my request. My configuration files are as follows:

/etc/xinetd.d/vsftpd:

service vsftpd
{
type = INTERNAL
server = /usr/sbin/vsftpd
nice = 10
socket_type = stream
protocol = tcp
user = root
wait = no
disable = no

}

/etc/pamd.conf/vsftpd:

#%PAM-1.0
auth required pam_listfile.so item=user sense=deny file=/etc/vsftpd.ftpusers onerr=succeed
auth required pam_stack.so service=system-auth
auth required pam_shells.so
account required pam_stack.so service=system-auth
session required pam_stack.so service=system-auth

/etc/vsftpd/vsftpd.conf:


# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
# anonymous_enable=YES
#
# Uncomment this to allow local users to log in.
local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES
#
# Default umask for local users is 077. You may wish to change this to 022, # if your users expect that (022 is used by most other ftpd's)
local_umask=022
#
# Uncomment this to allow the anonymous FTP user to upload files. This only # has an effect if the above global write enable is activated. Also, you will # obviously need to create a directory writable by the FTP user.
#anon_upload_enable=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create # new directories.
#anon_mkdir_write_enable=YES
#
# Activate directory messages - messages given to remote users when they # go into a certain directory.
dirmessage_enable=YES
#
# Activate logging of uploads/downloads.
xferlog_enable=YES
#
# Make sure PORT transfer connections originate from port 20 (ftp-data).
connect_from_port_20=YES
#
# If you want, you can arrange for uploaded anonymous files to be owned by # a different user. Note! Using "root" for uploaded files is not # recommended!
chown_uploads=YES
chown_username=dduck
#
# You may override where the log file goes if you like. The default is shown # below.
#xferlog_file=/var/log/vsftpd.log
#
# If you want, you can have your log file in standard ftpd xferlog format xferlog_std_format=YES # # You may change the default value for timing out an idle session.
#idle_session_timeout=600
#
# You may change the default value for timing out a data connection.
#data_connection_timeout=120
#
# It is recommended that you define on your system a unique user which the # ftp server can use as a totally isolated and unprivileged user.
#nopriv_user=ftpsecure
#
# Enable this and the server will recognise asynchronous ABOR requests. Not # recommended for security (the code is non-trivial). Not enabling it, # however, may confuse older FTP clients.
#async_abor_enable=YES
#
# By default the server will pretend to allow ASCII mode but in fact ignore # the request. Turn on the below options to have the server actually do ASCII # mangling on files when in ASCII mode.
# Beware that turning on ascii_download_enable enables malicious remote parties # to consume your I/O resources, by issuing the command "SIZE /big/file" in # ASCII mode.
# These ASCII options are split into upload and download because you may wish # to enable ASCII uploads (to prevent uploaded scripts etc. from breaking), # without the DoS risk of SIZE and ASCII downloads. ASCII mangling should be # on the client anyway..
ascii_upload_enable=YES
ascii_download_enable=YES
#
# You may fully customise the login banner string:
ftpd_banner=Welcome to WEBSVR2 FTP service.
#
# You may specify a file of disallowed anonymous e-mail addresses. Apparently # useful for combatting certain DoS attacks.
#deny_email_enable=YES
# (default follows)
#banned_email_file=/etc/vsftpd.banned_emails
#
# You may specify an explicit list of local users to chroot() to their home # directory. If chroot_local_user is YES, then this list becomes a list of # users to NOT chroot().
chroot_list_enable=YES
# (default follows)
chroot_list_file=/etc/vsftpd.chroot_list
#
# You may activate the "-R" option to the builtin ls. This is disabled by # default to avoid remote users being able to cause excessive I/O on large # sites. However, some broken FTP clients such as "ncftp" and "mirror" assume # the presence of the "-R" option, so there is a strong case for enabling it.
#ls_recurse_enable=YES

#pam_service_name=vsftpd
pam_service_name=ftpd
userlist_enable=YES
#enable for standalone mode
#listen=YES
#tcp_wrappers=YES

I thought at first that PAM wasn't authenticating me properly, but it looks more like the service just doesn't respond to requests. I tried running it as a stand-alone server as well, and that didn't work.

Any suggestions would be greatly appreciated.
sacredcowpaddy

2004-07-01, 12:59 pm

Not everybody all at once, please.
prezbedard

2004-07-05, 2:12 pm

I know linux and unix are a bit different but I experienced a similar problem while setting up an ftp server on my FreeBSD box. I was getting the same error message.

Does your xinetd.d file the following lines or something similar?

I uncommeted these lines and it solved the issue.

#ftp stream tcp nowait root /usr/libexec/ftpd ftpd -l
#ftp stream tcp6 nowait root /usr/libexec/ftpd ftpd -l
sacredcowpaddy

2004-07-05, 2:47 pm

That's the inetd.conf file -- it is used in FreeBSD and Slackware . . . Red Hat based distros use the xinetd.conf file and the files in xinetd.d directory. Yes, I have ftp enabled in them.
prezbedard

2004-07-05, 3:12 pm

I found this




quote:
if you are running xinetd, do the following:

Redhat users:

vi /etc/xinetd.d/vsftpd

# default: off
# description: The vsftpd FTP server serves FTP connections. It uses \
# normal, unencrypted usernames and passwords for authentication.
service ftp
{
disable = no
socket_type = stream
wait = no
user = root
server = /usr/sbin/vsftpd
nice = 10


here

http://www.vsftpd.org/rpm/

I noitced a slight difference in your file and the sample.

of course it could be nothing
sacredcowpaddy

2004-07-06, 3:43 pm

Thanks, but still no go.
devaldi

2004-07-19, 12:31 pm

What is in the hosts.allow and hosts.deny files?

I would also try to grep out any vsftp errors from all logs in /var/logs and see if that leads to anything.

Later
Devaldi
Boulware5

2004-07-19, 7:48 pm

quote:
Originally posted by devaldi
What is in the hosts.allow and hosts.deny files?

I would also try to grep out any vsftp errors from all logs in /var/logs and see if that leads to anything.

Later
Devaldi



Exactly what it says - allowed hosts and denied hosts. A good security practice is to have ALL:ALL in hosts.deny and put allowed hosts in hosts.allow.
devaldi

2004-07-20, 2:08 am

Sorry if I confused people about my last post "What is in the hosts.allow and hosts.deny files" this was for sacredcowpaddy who is having problems connecting to the vsftp server.

To be more precise make sure there is a line in the hosts.allow similar to "in.ftpd : allow : all". You can also check to make sure port 21 is listening with the netstat -nap command. If it is not then the service is not starting correctly.

Later
David
blinky

2004-08-19, 4:36 pm

Move the config file vsftpd.conf to
/etc.
rufusss

2004-08-31, 12:42 pm

I know when i setup vsftp on redhat 9 it was pretty simple took 5-10 minutes.You set it up as a separate daemon,i don't run xinetd.d for ftp.

After you install the rpm, you set it up to start automactically by typing "chkconfig --35 vsftpd on".
You will aslo need to edit the vsftpd.conf file. Don't forget the command "service vsftpd start"
GoodLuck.....................
Sponsored Links





Free Braindumps | MCSE braindumps software forum

Copyright 2003 - 2009 examnotes.net