LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-22-2005, 07:00 AM   #1
kd7isf
LQ Newbie
 
Registered: Oct 2005
Distribution: CentOS
Posts: 6

Rep: Reputation: 0
Exclamation Why wont VSFTPD work right?


Hi,

I have recently setup a linux server running the CentOS version of linux.
I am trying to get VSFTPD to work.
I HAVE gotten it running.
I HAVE created a new user
I HAVE tried to ftp to my box -- no success.
It DOES NOT matter weather I use a remote machine or if I type "ftp localhost" directly into my linux comand prompt, I get the SAME symptoms.

Symptoms:

Heres what it looks like when I try to login:

# ftp localhost
Connected to localhost.
220 Welcome to the Ray's Net FTP Zone.
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Name (localhost:admin): admin
530 Permission denied.
Login failed.
ftp> quit
221 Goodbye.

It DOES NOT matter which of my 3 different user names I use
It DOES NOT matter if I use root as my user name.
It DOES NOT matter if I add or remove the username I want to use from /etc/vsftp.ftpusers
It DOES NOT matter if I add or remove the username I want to use from /etc/vsftp.user_list


my /etc/vsftp/vsftp.conf file is as follows:

# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
#
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=NO
#
# 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
dirlist_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=whoever
#
# 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 the Ray's Net FTP Zone.
#
# 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
chroot_local_user=YES
#
# 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
userlist_enable=YES
userlist_deny=NO
#enable for standalone mode
listen=YES
tcp_wrappers=NO
pasv_enable=YES




ANY help you can give me will be appriciated, however, please consider the following:

1. DO NOT tell me to change a file UNLESS you ARE going to tell me WHERE the file IS. WAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY to many linux forums tell you to change whateverfilename.conf BUT THE STUPID PERSON WHO TELLS YOU CHANGE SUCH FILE DOES NOT TELL YOU WHERE SUCH FILE IS LOCATED. YOU WILL GET A VERY DEROGITIVE RESPONSE FROM ME IF YOU TELL ME TO CHANGE A FILE AND YOU FAIL TO TELL ME WHERE THE FILE YOU WANT ME TO CHANGE IS LOCATED.

2. DO NOT tell me to search on google. I have ALREADY DONE THAT. THAT'S WHY I AM HERE. I HAVE SPENT OVER 30 HRS ON GOOGLE TRYING TO SOLVE THIS PROBLEM. EVER SINCE GOOGLE BECAME A PUBLICLY TRADED CORP, THEY HAVE SUCKED AND LOST 99% OF THEIR USEFULNESS.

3. PLEASE READ my ENTIRE post BEFORE writing a response. I have gotten WAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY to many responses on forums/emails/etc asking me if I have done XXX or tried XXX when I VERY PLAINLY described that I DID DO XXX, and what the results were. PLEASE feel free to ask me HOW I did XXX though.

Sorry for haveing to put such a stern suffix on my post, but I am just trying to ask for a little common sense/logical troubleshooting/consideration for those of us that really dont have much experience with this stuff.

THANKS

--RAY d:o)
 
Old 10-22-2005, 09:28 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529
Let's make some things clear before things get out of hand:

1. DO NOT tell me to change a file UNLESS you ARE going to tell me WHERE the file IS.
First of all: don't shout. Sure you're frustrated it doesn't work like you want it to, but please don't advertise it that way. Ppl usually don't react that good to it. Second, be polite. Don't tell people what to do: ask.

That said, if you kept the default slocate cronjob running you should be able to do "slocate vsftp.conf" and get the location, or if it is a know part of a package try "rpm -ql vsftpd|grep vsftp.conf".


YOU WILL GET A VERY DEROGITIVE RESPONSE FROM ME
No we won't. Remember you agreed to the rules when you signed up for an account. LQ is a friendly community and there are no valid reasons to do so. Please reread the rules if unsure.
 
Old 10-22-2005, 09:32 AM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529
Let's see if the auth stuff goes right:


Using: local_enable=YES
Finds users in /etc/passwd. All stuff required applies like having set password, usable home etc. (*That's why I like using Vsftpd with pam_userdb. This means you don't need to muck around with /etc/passwd and keep them users "virtual" in a separate database.)


Using: pam_service_name=vsftpd
Use PAM auth. Default vsftpd PAM listfile config: "item=user sense=deny file=/etc/vsftpd.ftpusers" meaning users in /etc/vsftpd.ftpusers may NOT log in (usually reserved for blocking system accounts, that is from ID 0 to 500 on regular boxen). The rest of the auth process requirements is handled by /etc/pam.d/system-auth.


Using: userlist_enable=YES
Added: +userlist_deny=NO
deny=NO, meaning users in /etc/vsftpd.user_list are allowed to log in. Since "deny=NO" isn't by default enabled in vsftpd.conf, and the contents of default vsftpd's version of /etc/vsftpd.user_list are equal to that of /etc/vsftpd.ftpusers, this would mean that if you have "deny=NO" you would have to clear the contents of /etc/vsftpd.user_list and ONLY add the users you want login enabled for.



Heres what it looks like when I try to login:

# ftp localhost
(..)530 Please login with USER and PASS. <- trying to auth using current account user/pass?
(..)Name (localhost:admin): admin
530 Permission denied. <- I don't see a passwd prompt?
Login failed.

Not shown a passwd prompt is significant. Could mean during the auth process the user is recognised to be denied access.


It DOES NOT matter which of my 3 different user names I use
Checking. Are they all unprivileged users? Are all three accounts properly configured? Can you log in as any of those users?


It DOES NOT matter if I use root as my user name.
Root account is denied from /etc/vsftpd.ftpusers by default so there's no sense in trying that.


It DOES NOT matter if I add or remove the username I want to use from /etc/vsftp.ftpusers
In a default installation this file DENIES users access.


It DOES NOT matter if I add or remove the username I want to use from /etc/vsftp.user_list
Please check if /etc/vsftpd.user_list ONLY contains the users you want login enabled for.
 
Old 10-22-2005, 10:34 AM   #4
kd7isf
LQ Newbie
 
Registered: Oct 2005
Distribution: CentOS
Posts: 6

Original Poster
Rep: Reputation: 0
Hi,

thanks.

I know the rules -- the purpose in what I wrote was merly to catch peoples attention -- I participate in many forums and I hate when people won't read my post before they try to answer and when they provide an incomplete answer.

thanks for being thourough d:o)

Also, what is slocate?

again, thanks, I am now one step closer. Apparently, Linux is VERY p-i-c-k-y!! I had removed ALL names from BOTH the vsftpd.ftpusers file and the vsftpd.user_list. It seems you HAVE to tell it which users ARE allowed. I put the ones I wanted to be able to login in the user_list file and that progressed me one step (after stopping and restarting the vsfptd service, of course)

Now it lets me log in, but it says "500 OOPS: could not open chroot() list file:/etc/vsftpd.chroot_list" and then "login failed"

I don't have a /etc/vsftpd.chroot_list file. Is there a suggested way to make one (i.e. what to put in it)?

thanks d:o)
 
Old 10-22-2005, 10:43 AM   #5
mrcheeks
Senior Member
 
Registered: Mar 2004
Location: far enough
Distribution: OS X 10.6.7
Posts: 1,690

Rep: Reputation: 51
Again be polite, unSpawn did help you but he wasn't not obliged to. Would you answer to someone yelling at you?

If someone tells you the filename but not its location, you can use the search function in kde or gnome or use the locate command to find it.
 
Old 10-22-2005, 10:53 AM   #6
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,192

Rep: Reputation: 101Reputation: 101
Well, from your configuration put all the users that you don't want chroot'ed (that is, all those users who shouldn't be made to have their home directory as the root), if don't want anyone exempt from the chroot then set chroot_list_enable=No in vsftpd.conf.

slocate is a utility that searches a database indexing all the files on your hdd. If cron is still running `updatedb` every night then this database will be kept up todate and you can do `locate vsftpd.conf` to find out where it is.

Its difficult to give you a path to the file because its location can change depending on the configuration options used during the compile, for example it could be under /etc or /usr/local/etc
 
Old 10-22-2005, 11:01 AM   #7
kd7isf
LQ Newbie
 
Registered: Oct 2005
Distribution: CentOS
Posts: 6

Original Poster
Rep: Reputation: 0
Hi,

I dont have KDE or GNOME yet.

I spent over 3 hours looking for the command to do a search and came up blank. So I had to assume there wasn't one. And if there wasn't one, then, logically, not giving a file location is rude.

anyway, thanks for everyones help, I commented out "chroot_list_enable=YES" and the line that says where chroot list is.

Now I can ftp the way I want to from my LAN, using my LAN IP.


However, if I try to use the WAN IP , or my domain, i get the following:

200 Switching to ASCII mode
227 entering passive mode (
425 Security: Bad IP connecting

thanks d:o)
 
Old 10-22-2005, 02:22 PM   #8
kd7isf
LQ Newbie
 
Registered: Oct 2005
Distribution: CentOS
Posts: 6

Original Poster
Rep: Reputation: 0
Hi,

OK, i figured out that the errors in my last post were caused by the fact that in order to access by domain name, I need to be on a computer OUTSIDE my network. Once I tried that (i.e. used a dial up connection w/ my laptop) it worked just fine.

HOWEVER, now I have another problem.

Before I started trying to get FTP to work, I HAD http working. Now ftp works, but http returns "FORBIDDEN:403 error page also returned forbidden. You don't have access to "/" on this server"

again, THANKS for your help, and appriciate anything yall can do to help me on this one.



d:o)
 
Old 10-22-2005, 02:42 PM   #9
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,192

Rep: Reputation: 101Reputation: 101
Thats just permission problems, make sure all your web documents are readable by the user apache runs under aswell as all the directories inc. parent dirs and any .htaccess files
 
Old 10-22-2005, 04:27 PM   #10
kd7isf
LQ Newbie
 
Registered: Oct 2005
Distribution: CentOS
Posts: 6

Original Poster
Rep: Reputation: 0
Hi,

Thanks -- al works now x-cept one other little thing. I have been running nwebmail. Now when I go to the link for it, I get "Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request."

what did I do now?

(so close yet so far away d:o) )
 
Old 10-22-2005, 04:35 PM   #11
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,192

Rep: Reputation: 101Reputation: 101
Quote:
Originally posted by kd7isf
what did I do now?
Not the fogiest!!

This error isn't quite as specific as the 403, so I can't work out what has gone wrong. Have a look at apache's error log for more details.
 
Old 10-22-2005, 04:40 PM   #12
kd7isf
LQ Newbie
 
Registered: Oct 2005
Distribution: CentOS
Posts: 6

Original Poster
Rep: Reputation: 0
OOPS,

sorry, I forgot to include that.

Here is the line from the log:

"Premature end of script headers: nwebmail, referer: http://www.url.com/maint/index.php?"


thanks

d:o)
 
Old 10-22-2005, 05:06 PM   #13
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,192

Rep: Reputation: 101Reputation: 101
OK, well I'm not familiar with nwebmail and assuming you've not edited any of the config files nor the binary I would say that you need the nwebmail binary to have execute permission aswell as read permission for the user apache runs under
 
Old 11-06-2005, 12:07 PM   #14
viktor1983
LQ Newbie
 
Registered: Nov 2005
Location: Hungary
Distribution: CentOS
Posts: 1

Rep: Reputation: 0
on vsftp login failed

We've set up a new server, and I used our vsftpd.conf file from our old server. UIDs, GIDs were not changed, home dirs were on their place, but vsftpd didn't allowed anyone to login. The solution was commenting out the "auth required pam_shells.so
" line in /etc/pam.d/vsftpd file, because most of our users don't have a shell....
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 doesn't work on all computers clinton Linux - Networking 3 01-24-2005 06:46 PM
URGENT!: vsftpd chroot config wont take changes. Major business depends on this. Help CrewXp Linux - Newbie 5 01-02-2004 08:27 PM
vsftpd won't work with port 21 corpus_delicti Linux - Networking 5 10-14-2003 04:37 PM
FALCONS EYE (nethack) FAILS ON STARTUP, use to work, wont work even after reinstall roorings Linux - Software 0 10-08-2003 11:39 PM
Why wont vsftpd shut down?! ksoma Linux - Networking 0 07-09-2003 02:14 AM


All times are GMT -5. The time now is 04:14 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration