LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 04-14-2015, 12:48 AM   #1
byran cheung
Member
 
Registered: Sep 2013
Posts: 321

Rep: Reputation: Disabled
what ftp server is running


in my RHEL 4 server , I want to know what ftp server is running but can't find it.

I tried "ps -ef |grep ftp" but no output , chkconfig --list |grep ftp also no output related to ftp , /etc/rc.d/init.d can't find ftp service , ftp localhost is not allow .

when use FileZilla to connect it , it is ok , the ftp should be running , I tried to use "ps -ef |grep ftp" , it pops the following output , would advise what ftp server is running in server ? thanks

Code:
edp 11027 11026  0 12:39 ?        00:00:00 tcsh -c /usr/libexec/openssh/sftp-server
edp 11037 11027  0 12:39 ?        00:00:00 /usr/libexec/openssh/sftp-server
user   11050  7747  0 12:48 pts/2    00:00:00 grep ftp
 
Old 04-14-2015, 01:53 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 8,516

Rep: Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436
probably netstat -ap will help
 
Old 04-14-2015, 02:06 AM   #3
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_10{.0|.1|.2}
Posts: 4,029
Blog Entries: 1

Rep: Reputation: 2114Reputation: 2114Reputation: 2114Reputation: 2114Reputation: 2114Reputation: 2114Reputation: 2114Reputation: 2114Reputation: 2114Reputation: 2114Reputation: 2114
Not sure this applies to RHEL 4, but if it is handled by inetd look in /etc/inetd.conf and see what ftp line is enabled.
 
Old 04-14-2015, 02:25 AM   #4
byran cheung
Member
 
Registered: Sep 2013
Posts: 321

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by astrogeek View Post
Not sure this applies to RHEL 4, but if it is handled by inetd look in /etc/inetd.conf and see what ftp line is enabled.
thanks reply
I only have /etc/xinetd.conf , and checked , no ftp in this config file .

Thanks

---------- Post added 04-14-15 at 01:26 AM ----------

Quote:
Originally Posted by pan64 View Post
probably netstat -ap will help
thanks reply,

tried run netstat -ap , but no ftp service
 
Old 04-14-2015, 02:35 AM   #5
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_10{.0|.1|.2}
Posts: 4,029
Blog Entries: 1

Rep: Reputation: 2114Reputation: 2114Reputation: 2114Reputation: 2114Reputation: 2114Reputation: 2114Reputation: 2114Reputation: 2114Reputation: 2114Reputation: 2114Reputation: 2114
Just another guess, but try these...

Code:
service vsftpd status

service proftpd status
...see if there are any volunteers.

And still guessing vsftpd, you might open a session and look in...

Code:
tail /var/log/vsftpd.log
...OR...
tail /var/log/xferlog
...to see if it is there, or other recent timestamped messages.

In fact

Last edited by astrogeek; 04-14-2015 at 02:45 AM.
 
Old 04-14-2015, 03:30 AM   #6
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 8,516

Rep: Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436
Quote:
tried run netstat -ap , but no ftp service
How did you check that?
 
Old 04-14-2015, 04:02 AM   #7
Bruce783
LQ Newbie
 
Registered: Apr 2015
Location: Kommetjie, Cape Town, ZA
Distribution: Gentoo
Posts: 11

Rep: Reputation: Disabled
Post the output from...

Code:
netstat -tlnp | grep 21
This will determine what TCP service is listening on port 21. You can use this output to determine if you have a stand-alone FTP server running or if the FTP server is wrapped around something else.
 
Old 04-14-2015, 04:52 AM   #8
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Quote:
Originally Posted by byran cheung View Post
Code:
edp 11027 11026  0 12:39 ?        00:00:00 tcsh -c /usr/libexec/openssh/sftp-server
edp 11037 11027  0 12:39 ?        00:00:00 /usr/libexec/openssh/sftp-server
user   11050  7747  0 12:48 pts/2    00:00:00 grep ftp
This sftp-server comes bundled with sshd.

Else you could check your package list. rpm -qa and grep that for ftp
 
Old 04-14-2015, 06:16 AM   #9
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 476Reputation: 476Reputation: 476Reputation: 476Reputation: 476
As other already suggested but putting another possible way of using netstat:

Code:
netstat -ptan | grep LIST
Will show you all the services which are running and listening on which port. Should be able to get you the name of the application / daemon.

FTP port == 21
SFTP port == 22
 
Old 04-14-2015, 11:21 AM   #10
mddnix
Member
 
Registered: Mar 2013
Distribution: Redhat, Ubuntu
Posts: 516

Rep: Reputation: 139Reputation: 139
Code:
$ sudo nmap -sV localhost

PORT   STATE SERVICE VERSION
21/tcp open  ftp     vsftpd 3.0.2
22/tcp open  ssh     OpenSSH 6.8 (protocol 2.0)
Service Info: OS: Unix

$ netstat -tan | grep :21
tcp        0      0 0.0.0.0:21              0.0.0.0:*               LISTEN

Last edited by mddnix; 04-14-2015 at 11:26 AM.
 
Old 04-14-2015, 12:56 PM   #11
zafar_dandoti
Member
 
Registered: Dec 2005
Location: India
Distribution: centos
Posts: 169

Rep: Reputation: Disabled
Or the port is forwarded to another server running ftp service.
check iptables for rules.
Code:
iptables -L

Last edited by zafar_dandoti; 04-14-2015 at 01:27 PM.
 
Old 04-14-2015, 01:18 PM   #12
Habitual
LQ Addict
 
Registered: Jan 2011
Posts: 7,680
Blog Entries: 10

Rep: Reputation: 2080Reputation: 2080Reputation: 2080Reputation: 2080Reputation: 2080Reputation: 2080Reputation: 2080Reputation: 2080Reputation: 2080Reputation: 2080Reputation: 2080
Quote:
Originally Posted by byran cheung View Post
in my RHEL 4 server , I want to know what ftp server is running but can't find it.

I tried "ps -ef |grep ftp" but no output , chkconfig --list |grep ftp also no output related to ftp , /etc/rc.d/init.d can't find ftp service , ftp localhost is not allow .

when use FileZilla to connect it , it is ok , the ftp should be running , I tried to use "ps -ef |grep ftp" , it pops the following output , would advise what ftp server is running in server ? thanks

Code:
edp 11027 11026  0 12:39 ?        00:00:00 tcsh -c /usr/libexec/openssh/sftp-server
edp 11037 11027  0 12:39 ?        00:00:00 /usr/libexec/openssh/sftp-server
user   11050  7747  0 12:48 pts/2    00:00:00 grep ftp
Looks like a restricted sftp shell.
Look in /etc/ssh/sshd_config for
Subsystem sftp /usr/lib/openssh/sftp-server vs.
#Subsystem sftp /usr/lib/openssh/sftp-server

Last edited by Habitual; 04-14-2015 at 01:19 PM.
 
Old 04-14-2015, 11:11 PM   #13
byran cheung
Member
 
Registered: Sep 2013
Posts: 321

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by zhjim View Post
This sftp-server comes bundled with sshd.

Else you could check your package list. rpm -qa and grep that for ftp

#rpm -qa |grep ftp
lftp-3.0.6-8.el4
ftp-0.17-23.el4_6.1

does it mean lftp server is using ?

Last edited by byran cheung; 04-14-2015 at 11:16 PM.
 
  


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
Running an FTP server stfusonxxxx Linux - Newbie 6 10-11-2007 04:57 AM
Can't connect to FTP server running vsftpd eswafford Linux - Software 1 07-19-2007 09:56 AM
Trouble getting ftp server running on RHEL4.0 exitsfunnel Linux - Software 2 03-11-2006 03:49 PM
FTP Server Up and running... how do I hide ftp users from local login screen? joe1031 Mandriva 2 03-18-2005 05:24 PM
still can't get ftp server running syphon00 Linux - Networking 10 09-04-2002 05:49 PM


All times are GMT -5. The time now is 02:46 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