LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   what ftp server is running (https://www.linuxquestions.org/questions/linux-newbie-8/what-ftp-server-is-running-4175539646/)

byran cheung 04-13-2015 11:48 PM

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


pan64 04-14-2015 12:53 AM

probably netstat -ap will help

astrogeek 04-14-2015 01:06 AM

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.

byran cheung 04-14-2015 01:25 AM

Quote:

Originally Posted by astrogeek (Post 5347065)
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 (Post 5347061)
probably netstat -ap will help

thanks reply,

tried run netstat -ap , but no ftp service

astrogeek 04-14-2015 01:35 AM

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

pan64 04-14-2015 02:30 AM

Quote:

tried run netstat -ap , but no ftp service
How did you check that?

Bruce783 04-14-2015 03:02 AM

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.

zhjim 04-14-2015 03:52 AM

Quote:

Originally Posted by byran cheung (Post 5347049)
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

T3RM1NVT0R 04-14-2015 05:16 AM

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

Madhu Desai 04-14-2015 10:21 AM

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


zafar_dandoti 04-14-2015 11:56 AM

Or the port is forwarded to another server running ftp service.
check iptables for rules.
Code:

iptables -L

Habitual 04-14-2015 12:18 PM

Quote:

Originally Posted by byran cheung (Post 5347049)
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

byran cheung 04-14-2015 10:11 PM

Quote:

Originally Posted by zhjim (Post 5347114)
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 ?


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