LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 06-25-2003, 01:43 AM   #1
pelletie
LQ Newbie
 
Registered: Jun 2003
Location: Montreal, Canada
Posts: 1

Rep: Reputation: 0
Proftpd can't be launched from xinetd


Hi,

I'm unable to service "ftp requests" from proftpd
when proftpd is launched from xinetd. I've made
several tests and, at this point, I don't know
if the problem is related to some xinetd configuration
or some proftpd configuration or something else.

Here are tests and conclusions reached so far:

1- proftpd launched from command line (not xinetd)
responds nicely to ftp requests

2- proftpd launched from xinetd fails to respond
to ftp requests

3- ServerType changed from "standalone" to "inetd"
in file /etc/proftpd.conf does not correct problem

4- "old ftpd", launched from xinetd, responds
nicely to ftp requests

5- "old ftpd" and "proftpd" services are activated
alternatively by changing the "disable" property
in the corresponding ftp and proftpd-xinetd files
in directory /etc/xinetd.d

5- message collected from "syslog" file, when "proftpd"
is activated and ftp request is submitted, says "Failed
binding to 0.0.0.0, port 21:
Address already in use" (see "syslog" file content)

6- message collected from "syslog" file, when "old ftpd"
is activated and ftp request is submitted, shows that
everything is OK. (see "syslog" file content)

7- an "error" message is logged when xinetd is started:
"pmap_set failed. service=sgi_fam program=391002 version=2"
(see "syslog" file content)

8- tcpd is unavailable on this version of linux and
xinetd is "started with libwrap options compiled in"
(see "syslog" file content)

9- Linux version is Mandrake 9.1


Here are some file contents collected:


***** [file /etc/xinetd.conf]

defaults
{
instances = 60
log_type = SYSLOG authpriv
log_on_success = HOST PID
log_on_failure = HOST
cps = 25 30
}

includedir /etc/xinetd.d


***** [file /etc/xinetd.d/ftp]

service ftp
{
disable = no
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/ftpd
server_args = -l
log_on_success += DURATION USERID
log_on_failure += USERID
}


***** [file /etc/xinetd.d/proftpd-xinetd]

service ftp
{
disable = yes
socket_type = stream
wait = no
user = root
server = /usr/sbin/proftpd
log_on_success += DURATION USERID
log_on_failure += USERID
nice = 10
}


***** [file /etc/services]

# /etc/services:
# $Id: services,v 1.15 2003/01/20 09:49:18 chmouel Exp $
#
# Network services, Internet style
#
...
#
# service-name port/protocol [aliases ...] [# comment]

tcpmux 1/tcp # TCP port service multiplexer
tcpmux 1/udp # TCP port service multiplexer
rje 5/tcp # Remote Job Entry
rje 5/udp # Remote Job Entry
echo 7/tcp
echo 7/udp
discard 9/tcp sink null
discard 9/udp sink null
systat 11/tcp users
systat 11/udp users
daytime 13/tcp
daytime 13/udp
qotd 17/tcp quote
qotd 17/udp quote
msp 18/tcp # message send protocol
msp 18/udp # message send protocol
chargen 19/tcp ttytst source
chargen 19/udp ttytst source
ftp-data 20/tcp
ftp-data 20/udp
# 21 is registered to ftp, but also used by fsp
ftp 21/tcp
ftp 21/udp fsp fspd
ssh 22/tcp # SSH Remote Login Protocol
ssh 22/udp # SSH Remote Login Protocol
telnet 23/tcp
telnet 23/udp
# 24 - private mail system
smtp 25/tcp mail
smtp 25/udp mail
***** other entries deleted


***** [excerp from /var/log/syslog file]

...
[xinetd launched with "old fptd" service enabled and "proftpd" service disabled in /etc/xinetd.d directory]


Jun 24 16:31:09 passerelle xinetd[4138]: Reading included configuration file: /etc/xinetd.d/chargen [line=15]
Jun 24 16:31:09 passerelle xinetd[4138]: Reading included configuration file: /etc/xinetd.d/chargen-udp [line=14]
Jun 24 16:31:09 passerelle xinetd[4138]: Reading included configuration file: /etc/xinetd.d/cups-lpd [line=15]
Jun 24 16:31:09 passerelle xinetd[4138]: Reading included configuration file: /etc/xinetd.d/daytime [line=12]
Jun 24 16:31:09 passerelle xinetd[4138]: Reading included configuration file: /etc/xinetd.d/daytime-udp [line=14]
Jun 24 16:31:09 passerelle xinetd[4138]: Reading included configuration file: /etc/xinetd.d/echo [line=15]
Jun 24 16:31:09 passerelle xinetd[4138]: Reading included configuration file: /etc/xinetd.d/echo-udp [line=13]
Jun 24 16:31:09 passerelle xinetd[4138]: Reading included configuration file: /etc/xinetd.d/fam [line=14]
Jun 24 16:31:09 passerelle xinetd[4138]: Reading included configuration file: /etc/xinetd.d/ftp [line=18]
Jun 24 16:31:09 passerelle xinetd[4138]: Reading included configuration file: /etc/xinetd.d/linuxconf-web [line=15]
Jun 24 16:31:09 passerelle xinetd[4138]: Reading included configuration file: /etc/xinetd.d/proftpd-xinetd [line=13]
Jun 24 16:31:09 passerelle xinetd[4138]: Reading included configuration file: /etc/xinetd.d/rsync [line=16]
Jun 24 16:31:09 passerelle xinetd[4138]: Reading included configuration file: /etc/xinetd.d/servers [line=13]
Jun 24 16:31:09 passerelle xinetd[4138]: Reading included configuration file: /etc/xinetd.d/services [line=12]
Jun 24 16:31:09 passerelle xinetd[4138]: Reading included configuration file: /etc/xinetd.d/sshd-xinetd [line=12]
Jun 24 16:31:09 passerelle xinetd[4138]: Reading included configuration file: /etc/xinetd.d/swat [line=16]
Jun 24 16:31:09 passerelle xinetd[4138]: Reading included configuration file: /etc/xinetd.d/time [line=15]
Jun 24 16:31:09 passerelle xinetd[4138]: Reading included configuration file: /etc/xinetd.d/time-udp [line=14]
Jun 24 16:31:09 passerelle xinetd[4138]: Reading included configuration file: /etc/xinetd.d/xadmin [line=15]
Jun 24 16:31:09 passerelle xinetd[4138]: removing chargen
Jun 24 16:31:09 passerelle xinetd[4138]: removing chargen
Jun 24 16:31:09 passerelle xinetd[4138]: removing printer
Jun 24 16:31:09 passerelle xinetd[4138]: removing daytime
Jun 24 16:31:09 passerelle xinetd[4138]: removing daytime
Jun 24 16:31:09 passerelle xinetd[4138]: removing ftp
Jun 24 16:31:09 passerelle xinetd[4138]: removing ssh
Jun 24 16:31:09 passerelle xinetd[4138]: removing time
Jun 24 16:31:09 passerelle xinetd[4138]: removing time
Jun 24 16:31:09 passerelle xinetd[4138]: removing xadmin
Jun 24 16:31:09 passerelle xinetd[4138]: pmap_set failed. service=sgi_fam program=391002 version=2
Jun 24 16:31:10 passerelle xinetd[4138]: xinetd Version 2.3.11 started with libwrap options compiled in.
Jun 24 16:31:10 passerelle xinetd[4138]: Started working: 8 available services
Jun 24 16:31:23 passerelle ftpd[4140]: connection from 192.168.1.1 () at Tue Jun 24 16:31:23 2003
Jun 24 16:31:50 passerelle ftpd[4140]: ANONYMOUS FTP LOGIN FROM 192.168.1.1, (pelletie@ireq.ca)
...

[xinetd launched with "old fptd" service disabled and "proftpd" service enabled in /etc/xinetd.d directory]

Jun 24 13:28:51 passerelle xinetd[15058]: Reading included configuration file: /etc/xinetd.d/chargen [line=15]
Jun 24 13:28:51 passerelle xinetd[15058]: Reading included configuration file: /etc/xinetd.d/chargen-udp [line=14]
Jun 24 13:28:51 passerelle xinetd[15058]: Reading included configuration file: /etc/xinetd.d/cups-lpd [line=15]
Jun 24 13:28:51 passerelle xinetd[15058]: Reading included configuration file: /etc/xinetd.d/daytime [line=12]
Jun 24 13:28:51 passerelle xinetd[15058]: Reading included configuration file: /etc/xinetd.d/daytime-udp [line=14]
Jun 24 13:28:51 passerelle xinetd[15058]: Reading included configuration file: /etc/xinetd.d/echo [line=15]
Jun 24 13:28:51 passerelle xinetd[15058]: Reading included configuration file: /etc/xinetd.d/echo-udp [line=13]
Jun 24 13:28:51 passerelle xinetd[15058]: Reading included configuration file: /etc/xinetd.d/fam [line=14]
Jun 24 13:28:51 passerelle xinetd[15058]: Reading included configuration file: /etc/xinetd.d/ftp [line=18]
Jun 24 13:28:51 passerelle xinetd[15058]: Reading included configuration file: /etc/xinetd.d/linuxconf-web [line=15]
Jun 24 13:28:51 passerelle xinetd[15058]: Reading included configuration file: /etc/xinetd.d/proftpd-xinetd [line=13]
Jun 24 13:28:51 passerelle xinetd[15058]: Reading included configuration file: /etc/xinetd.d/rsync [line=16]
Jun 24 13:28:51 passerelle xinetd[15058]: Reading included configuration file: /etc/xinetd.d/servers [line=13]
Jun 24 13:28:51 passerelle xinetd[15058]: Reading included configuration file: /etc/xinetd.d/services [line=12]
Jun 24 13:28:51 passerelle xinetd[15058]: Reading included configuration file: /etc/xinetd.d/sshd-xinetd [line=12]
Jun 24 13:28:51 passerelle xinetd[15058]: Reading included configuration file: /etc/xinetd.d/swat [line=16]
Jun 24 13:28:51 passerelle xinetd[15058]: Reading included configuration file: /etc/xinetd.d/time [line=15]
Jun 24 13:28:51 passerelle xinetd[15058]: Reading included configuration file: /etc/xinetd.d/time-udp [line=14]
Jun 24 13:28:51 passerelle xinetd[15058]: Reading included configuration file: /etc/xinetd.d/xadmin [line=15]
Jun 24 13:28:51 passerelle xinetd[15058]: removing chargen
Jun 24 13:28:51 passerelle xinetd[15058]: removing chargen
Jun 24 13:28:51 passerelle xinetd[15058]: removing printer
Jun 24 13:28:51 passerelle xinetd[15058]: removing daytime
Jun 24 13:28:51 passerelle xinetd[15058]: removing daytime
Jun 24 13:28:51 passerelle xinetd[15058]: removing ftp
Jun 24 13:28:51 passerelle xinetd[15058]: removing ssh
Jun 24 13:28:51 passerelle xinetd[15058]: removing time
Jun 24 13:28:51 passerelle xinetd[15058]: removing time
Jun 24 13:28:51 passerelle xinetd[15058]: removing xadmin
Jun 24 13:28:51 passerelle xinetd[15058]: pmap_set failed. service=sgi_fam program=391002 version=2
Jun 24 13:28:52 passerelle xinetd[15058]: xinetd Version 2.3.11 started with libwrap options compiled in.
Jun 24 13:28:52 passerelle xinetd[15058]: Started working: 8 available services
...
Jun 24 13:30:03 passerelle proftpd[15083]: passerelle - Failed binding to 0.0.0.0, port 21: Address already in use
Jun 24 13:30:03 passerelle proftpd[15083]: passerelle - Check the ServerType directive to ensure you are configured correctly.
...
 
Old 06-28-2003, 06:41 PM   #2
cropcircle
Member
 
Registered: Jun 2003
Location: Netherlands
Distribution: Red Hat Linux 9, FreeBSD 4.8, Knoppix 3.2
Posts: 182

Rep: Reputation: 30
Hmmm...

<snip>
***** [file /etc/xinetd.d/proftpd-xinetd]

service ftp
{
disable = yes <---------- What happens if you set this to "no" and restart xinetd?
socket_type = stream
wait = no
user = root
server = /usr/sbin/proftpd
log_on_success += DURATION USERID
log_on_failure += USERID
nice = 10
}
 
Old 04-01-2004, 12:11 PM   #3
VincentB
Member
 
Registered: Jun 2003
Location: Brussels, Belgium
Distribution: Ubuntu 6.10
Posts: 139

Rep: Reputation: 15
I had the same problem.

Apr 1 19:02:25 sun proftpd[3802]: sun.xxxx.be - Failed binding to 0.0.0.0, port 21: Address already in use
Apr 1 19:02:25 sun proftpd[3802]: sun.xxxx.be - Check the ServerType directive to ensure you are configured correctly.

[root@sun xinetd.d]# netstat -tanp
Connexions Internet actives (serveurs et établies)
Proto Recv-Q Send-Q Adresse locale Adresse distante Etat PID/Program name
tcp 0 0 127.0.0.1:32768 0.0.0.0:* LISTEN 3001/fam
tcp 0 0 0.0.0.0:32769 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:2049 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 2471/mysqld
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 2493/smbd
tcp 0 0 0.0.0.0:683 0.0.0.0:* LISTEN 1350/ypserv
tcp 0 0 0.0.0.0:685 0.0.0.0:* LISTEN 2201/rpc.mountd
tcp 0 0 0.0.0.0:654 0.0.0.0:* LISTEN 2170/rpc.rquotad
tcp 0 0 127.0.0.1:783 0.0.0.0:* LISTEN 2384/spamd -d -c -a
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1269/portmap
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 2656/httpd2
tcp 0 0 0.0.0.0:10000 0.0.0.0:* LISTEN 2475/perl
tcp 0 0 0.0.0.0:6000 0.0.0.0:* LISTEN 1940/X
tcp 0 0 0.0.0.0:785 0.0.0.0:* LISTEN 1878/rpc.ypxfrd
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 3973/xinetd
tcp 0 0 192.168.1.100:53 0.0.0.0:* LISTEN 1961/named
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 1961/named
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1985/sshd
tcp 0 0 0.0.0.0:23 0.0.0.0:* LISTEN 3973/xinetd
tcp 0 0 0.0.0.0:631 0.0.0.0:* LISTEN 2078/cupsd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2364/master
tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN 1961/named
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 2656/httpd2
tcp 0 0 0.0.0.0:668 0.0.0.0:* LISTEN 1334/rpc.statd
tcp 0 0 0.0.0.0:7741 0.0.0.0:* LISTEN 2696/lisa


The problem was due to the fact that inetd was listening of port 21, which is precisely the port use by proftp.

Here is the content of my the proftpd.conf file:

[root@sun etc]# more /etc/proftpd.conf
# 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 inetd
DefaultServer on

# Allow FTP resuming.
# Remember to set to off if you have an incoming ftp for upload.
AllowStoreRestart 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 30

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

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

# Normally, we want files to be overwriteable.
<Directory />
AllowOverwrite on
</Directory>

# Needed for NIS.

PersistentPasswd off

# Default root can be used to put users in a chroot environment.
# As an example if you have a user foo and you want to put foo in /home/foo
# chroot environment you would do this:
#
# DefaultRoot /home/foo foo
Include /etc/proftpd-anonymous.conf


My problem came from Servertype which was Standalone and which should have been inetd (as I use inetd and do not run proftpd as daemon)

Finally, my proftpd-xinetd file looks like this:

[root@sun etc]# more /etc/xinetd.d/proftpd-xinetd
# default: off
# description: proftpd server, xinetd version. \
# Don't run the standalone version if you run \
# this!
service ftp
{
disable = no
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.ftpd
log_on_success += DURATION USERID
log_on_failure += USERID
nice = 10
}


I have also deleted the FTP file from that directory.
Now you just have to adapt proftpd.conf file in order to grant / deny access to users.
I have spent evenings during 2 weeks trying to solve this. Hope this will also work fine for you with those indications.

Regards,
Vincent
 
Old 08-26-2008, 02:54 PM   #4
woliveirajr
LQ Newbie
 
Registered: Aug 2008
Posts: 1

Rep: Reputation: 0
In the above message...

I'm running debian and I found just one thing to be different.

Instead of

server = /usr/sbin/in.ftpd

in the /etc/xinet.d/proftpd, I have to put

server = /usr/sbin/in.proftpd

Then it began to work :-)

Bye
 
  


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
ProFTPd on bootup with xinetd Raw Kuts Linux - Software 2 08-03-2006 11:44 PM
proFTPd using XINETD HELP!! sc_3007 Linux - Networking 2 08-03-2006 03:55 PM
xinetd launched ssh port forwarding tommyr1216 Linux - Software 0 01-20-2005 07:53 PM
proftpd will not run under xinetd jon_k Linux - Software 1 12-18-2004 05:14 AM
proftpd and xinetd pfunk Linux - Networking 1 12-08-2004 01:59 AM


All times are GMT -5. The time now is 07:15 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration