LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-09-2004, 09:03 AM   #1
Permaximus
Member
 
Registered: Sep 2004
Distribution: Slackware
Posts: 61

Rep: Reputation: 15
proftpd configuration


I am following the tutorial on this site to configure an ftp using proftpd and I am sort of in a rut. I have the program configured and everything, I edited the config file to what I wanted it to be. But before I installed I tried running in by
ftp localhost
This is the output that I got:
[root@localhost proftpd-1.2.10]# ftp localhost Connected to localhost (127.0.0.1).
421 Service not available, remote server has closed connection
ftp>


I dont really know what the problem is. Any helpis greatly appreciated. If you need me to post my config file then I can. Thanks.
 
Old 12-09-2004, 11:42 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Just guessing here, you might want to post your config file if my suggestions don't get you anywhere.

- Did you set up an anonymous only config?
- Are the Allow and Deny entries ok?

-Did you check your /etc/xinetd.conf settings? Maybe the (ftp) service is bound to
some other ip adress (bind = 0.1.2.3).

Hope this helps.
 
Old 12-10-2004, 08:38 AM   #3
Permaximus
Member
 
Registered: Sep 2004
Distribution: Slackware
Posts: 61

Original Poster
Rep: Reputation: 15
It is actually set to NOT allow anonymous logins. I am not quite sure what you mean by Allow and Deny Entries. And I looked at /etc/xinetd.conf and there was nothing about ftp that I saw. So here is my config file. Thank you.

# This is a basic ProFTPD configuration file (rename it to
# 'proftpd.conf' for actual use. It establishes a single server
# and a single anonymous login. It assumes that you have a user/group
# "nobody" and "ftp" for normal operation and anon.

ServerName "ProFTPD Default Installation"
ServerType standalone
DefaultServer on

# Port 21 is the standard FTP port.
Port 21

# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask 022

# To prevent DoS attacks, set the maximum number of child processes
# to 30. If you need to allow more than 30 concurrent connections
# at once, simply increase this value. Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd).
MaxInstances 5

# Set the user and group under which the server will run.
User caleb
Group nobody

# To cause every FTP user to be "jailed" (chrooted) into their home
# directory, uncomment this line.
#DefaultRoot ~

# Normally, we want files to be overwriteable.
AllowOverwrite on

# Bar use of SITE CHMOD by default
<Limit SITE_CHMOD>
DenyAll
</Limit>

# Bar use of SITE CHMOD by default
<Limit SITE_CHMOD>
DenyAll
</Limit>
 
Old 12-10-2004, 03:17 PM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
The way you set it up xinetd isn't used (ServerType standalone), so your xinetd.config looks ok (only talking ftp, ofcourse ).

Only thing I see that I should do different (and you probably should) is the User under which the ftpd server runs (User caleb).

Leave it to what proftpd uses (user nobody), or create a special user/group for it.

Here's an example config I use for my local network (IP numbers are fake). It listens on 1.2.100.5 a 100 Mb network. It also binds (listens) on 127.0.0.1 (localnet) and 1.2.10.5 (10 Mb network):
Code:
# -------------------------------------------------------------------------- #
# /etc/proftpd.conf
# -------------------------------------------------------------------------- #

ServerName          "Inferno"
ServerType          standalone
DefaultServer       on
ServerIdent         off
Port                21
SyslogFacility      ftp
SyslogLevel         info
DefaultAddress      1.2.100.5
Bind                127.0.0.1
Bind                1.2.10.5
DeferWelcome        on
AccessGrantMsg      "Welcome to inferno."
ScoreboardFile      /etc/proftpd.scoreboard
Umask               022
MaxInstances        10
User                proftpd
Group               proftpd
<Directory />
  AllowOverwrite    on
</Directory>
# -------------------------------------------------------------------------- #
# End
You migth not need/want the Listen and 2 Bind entries. Just delete them if you don't. Instead of listening to 3 specific ip numbers you will listen on port 21 of all ip numbers.

About the 421 error. Don't know if you checked it's meaning, but it doeas suggests that ftpd is actually working and could be related to an authentication problem.

That's why I suggest loosing Caleb as user and put a more 'daemon dedicated' user in it's place.

Hope this gets you going again.
 
Old 12-13-2004, 08:53 AM   #5
Permaximus
Member
 
Registered: Sep 2004
Distribution: Slackware
Posts: 61

Original Poster
Rep: Reputation: 15
I got the ftp up and running. I could ftp into localhost and exectue commands and everything, but after I installed it is giving me this 421 Service not available, remote server has closed connection crap again. It cant be my config file can it? Because I had it up and running. What could it be?
 
Old 12-13-2004, 12:00 PM   #6
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Quote:
I got the ftp up and running. I could ftp into localhost and exectue commands and everything, but after I installed it is giving me this
This is not clear to me. To be able to log on to an ftp server (localy or remote) an ftpd server needs to be installed and configured. What did you actually do after it worked localy? Did you change any settings?

Quote:
It cant be my config file can it? Because I had it up and running. What could it be?
You do not tell what you changed and what the config looks like. Did you apply any of the 'tips' I gave. Without any extra info I cannot exclude your config file as being the cause of the problem.

Like I stated before, the 421 error is probably related to an authentication problem (is proftpd running with a valid user/group, are users correct. do they have a valid password etc.).

Last edited by druuna; 12-13-2004 at 12:01 PM.
 
Old 12-13-2004, 11:07 PM   #7
Permaximus
Member
 
Registered: Sep 2004
Distribution: Slackware
Posts: 61

Original Poster
Rep: Reputation: 15
I am pretty sure you can run it before install. I executed the command: /usr/src/proftpd-1.2.8/proftpd -c /usr/src/proftpd-1.2.8/sample-configurations/basic.conf and it logged in to localhost. After I did that it worked perfectly. Then I typed make install and it installed seamlessly. I didnt change any settings or anthing in the config file. I checked all the user groups and they all seem fine. I just dont understand how it worked and then didnt. It seems kind of random to me. Thanks for being so paitent.
 
Old 12-14-2004, 02:52 AM   #8
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
You can run:
Code:
proftpd -t
to test your config and:
Code:
proftpd -n -d 9
to debug proftpd
 
  


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
proftpd configuration...help!! time112852 Linux - Software 3 11-29-2005 10:12 AM
proFTPd configuration shakeeb Linux - Software 1 11-23-2003 08:43 AM
Proftpd configuration help exalik Linux - Security 1 09-06-2003 03:27 PM
proFTPD configuration help please ScreeminChikin Linux - Networking 1 01-04-2003 07:59 PM
ProFTPd Configuration Help needamiracle Linux - Software 2 09-28-2002 11:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:07 AM.

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