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 03-16-2015, 07:34 AM   #1
wowy
Member
 
Registered: Mar 2015
Location: France
Distribution: Ubuntu 14.04
Posts: 61

Rep: Reputation: Disabled
inet.conf never start the ftp daemon


Hi,

i am trying the run a ftp daemon on my board (sbc6000x) but it seems that the ftpd service is never started by inetd.conf.

My inetd.conf is :

Code:
#<service_name>	<sock_type>	<proto>	<flags> <user> 	<server_path> 	<args> 

ftp			stream		tcp		nowait	root	/usr/bin/ftpd ftpd -w
telnet			stream		tcp		nowait	root    /usr/sbin/telnetd
Telnet don't run too but this is because i am missing some folders and i can launch it manually after creating the folders without issue, but maybe the fact that it can't run telnet because of the missing folders make it stop trying the ftp daemon ?

I check with the command "ps", the processus is not running hidden anywhere.
 
Old 03-16-2015, 08:06 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,911
Blog Entries: 14

Rep: Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142
Is inetd daemon running? Is it possible your system uses xinetd instead of inetd?

What happens when you run "lsof -i :20" and "lsof -i :21"?

Do you have those ports defined in /etc/services similar to the following?
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
 
Old 03-16-2015, 08:43 AM   #3
wowy
Member
 
Registered: Mar 2015
Location: France
Distribution: Ubuntu 14.04
Posts: 61

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by MensaWater View Post
Is inetd daemon running? Is it possible your system uses xinetd instead of inetd?

What happens when you run "lsof -i :20" and "lsof -i :21"?

Do you have those ports defined in /etc/services similar to the following?
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
When i use the command "ps" i don't see the inetd daemon running.
I don't think the system use xinedt, i don't find any folder or file name like that in the system.

I tried your command but not more luck :

Code:
# lsof -i :20
sh: can't execute 'lsof': No such file or directory
Code:
~ # lsof -i :21
sh: can't execute 'lsof': No such file or directory
The etc/services is like that for this kind of ports yes.
 
Old 03-16-2015, 10:04 AM   #4
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,911
Blog Entries: 14

Rep: Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142
lsof may not be installed. I highly recommend that tool as it can show you many things including networking. (lsof = list open files). You can use "netstat -an |grep LISTEN" just to see what network ports are LISTENing.

If inetd (or xinetd) isn't running then you're not listening for ftp port (under inetd or xinetd control). You need to focus on starting inetd.
 
Old 03-16-2015, 10:36 AM   #5
wowy
Member
 
Registered: Mar 2015
Location: France
Distribution: Ubuntu 14.04
Posts: 61

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by MensaWater View Post
lsof may not be installed. I highly recommend that tool as it can show you many things including networking. (lsof = list open files). You can use "netstat -an |grep LISTEN" just to see what network ports are LISTENing.

If inetd (or xinetd) isn't running then you're not listening for ftp port (under inetd or xinetd control). You need to focus on starting inetd.
When launching inetd manually and using the command netstat -an |grep LISTEN, i have this :

Code:
netstat: no support for 'AF INET6 (tcp)' on this system
netstat: no support for 'AF INET6 (udp)' on this system
netstat: no support for 'AF INET6 (raw)' on this system
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN

tcp        0      0 0.0.0.0:21              0.0.0.0:*               LISTEN

tcp        0      0 0.0.0.0:23              0.0.0.0:*               LISTEN
21 for ftp and fsp (but not 20 for ftp-data...), 23 for Telnet.

When trying to connect to the board from another computer with Telnet i have an connection refused (even when in hosts.allow i give all ports open for the ip of the computer) and trying to connect to the ftp by using a ftp browser with somethign like ftp://ipoftheboard/ simply load nothing.
 
Old 03-16-2015, 01:27 PM   #6
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,911
Blog Entries: 14

Rep: Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142
It listens on port 21 for ftp but needs port 20 for data for some connections. Make sure your firewall is open for both ports.
 
Old 03-16-2015, 08:30 PM   #7
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,702

Rep: Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270
Is ftpd actually in /usr/bin? Most of the time I find it in /usr/sbin or /sbin as it is not a general command.

If it doesn't start, inetd should be reporting an error for it.
 
Old 03-17-2015, 02:43 AM   #8
wowy
Member
 
Registered: Mar 2015
Location: France
Distribution: Ubuntu 14.04
Posts: 61

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jpollard View Post
Is ftpd actually in /usr/bin? Most of the time I find it in /usr/sbin or /sbin as it is not a general command.

If it doesn't start, inetd should be reporting an error for it.
After checking it seems that the symlink is in /bin but the path in inetd.conf is /usr/bin/ftpd. I will try to change the path in my inetd.cong file.
 
Old 03-17-2015, 02:45 AM   #9
wowy
Member
 
Registered: Mar 2015
Location: France
Distribution: Ubuntu 14.04
Posts: 61

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by MensaWater View Post
It listens on port 21 for ftp but needs port 20 for data for some connections. Make sure your firewall is open for both ports.
I tried to connect from a pc with no firewall (simply via a router) and still no connection.
 
Old 03-17-2015, 09:02 AM   #10
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,911
Blog Entries: 14

Rep: Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142
Quote:
Originally Posted by wowy View Post
I tried to connect from a pc with no firewall (simply via a router) and still no connection.
Did you turn off the system's own firewall (e.g. iptables)?
 
Old 03-17-2015, 09:18 AM   #11
wowy
Member
 
Registered: Mar 2015
Location: France
Distribution: Ubuntu 14.04
Posts: 61

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by MensaWater View Post
Did you turn off the system's own firewall (e.g. iptables)?
iptables don't exist on my system so i would assume that there is no firewall ON on it.
 
  


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
how does rc.inet.conf relate to eth number and nic? Z038 Linux - Networking 3 12-21-2012 11:02 PM
Bash script to verify the daemon is working if not, start the daemon kishoreru Linux - Newbie 7 09-23-2009 04:29 AM
Missing /etc/inet/resolv.conf and /etc/defaultrouter files fresh Solaris 8 install mwx Linux - Networking 4 01-27-2009 01:39 AM
Failed to start FTP server - server daemon when in inetd mode. pujakofriendly Slackware 2 11-30-2006 01:58 AM
x11vnc as a inet.conf service vic102482 Solaris / OpenSolaris 4 05-04-2005 02:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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