Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I can't seem to find a way to stop / re-start proftpd. My server IP address is xx.yy.zz.ww and connecting from external devices via FTP gives me the prompt:

Connected to xx.yy.zz.ww
220 ProFTPD 1.3.1 Server (ProFTPD)

It then asks me for username.

Same thing happens when I try to connect from the same server (ftp localhost). Thus, I have established that proftp is running on my server .

Also, on my server (xx.yy.zz.ww) . I am tailing /var/log/messages and it shows me FTP session opened and closed.

I can't find how is the proftpd is working. /etc/init.d/ doesn't have proftpd ; /etc/xinetd.d/ doesn't have proftpd.

I looked at: /etc/proftpd.conf and it shows me ServerType inetd

also, when I run: ps -auxfww | grep proftp I don't get anything (except my current command)

How can I find out that proftp is running and how do I kill it / restart it ?

share|improve this question
    
Have you checked /etc/xinetd.conf, it is possible to put the configuration there as opposed to /etc/xinetd.d/* –  Peter Lindqvist Apr 13 '11 at 14:20
    
I checked it. There is nothing in the xinetd.conf except for the default template defaults{} –  Stewie Apr 13 '11 at 14:22

4 Answers 4

up vote 3 down vote accepted

Use netstat to see what process is holding port 21:

# netstat -tnlp

And from there you can use RPM to see what package owns the file to stop it and remove it from init.d.

share|improve this answer
    
sorry, linux noob here.. bear with me. This is what I get cp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 26848/xinetd How do I proceed further –  Stewie Apr 13 '11 at 14:26
    
Well then it's xinetd that is serving it. You can stop/restart it by xinetd's script. Do a grep ftp on xinetd.d and xinetd.conf and see if there's any reference to it. –  coredump Apr 13 '11 at 14:38
    
this is what I get [root@s87998 xinetd.d]# cat /etc/xinetd.d/ftp_psa service ftp { disable = no socket_type = stream protocol = tcp wait = no user = root instances = UNLIMITED server = /usr/sbin/in.proftpd server_args = -c /etc/proftpd.conf } –  Stewie Apr 13 '11 at 14:48
    
Thanks, finally this worked: chkconfig ftp_psa on/off .. –  Stewie Apr 13 '11 at 14:55

cp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 26848/xinetd means that your proftpd is controlled by xinetd. xinetd provides the ability to start a deamon only when someone calls a specific port. Please check /etc/xinetd.d/ for files which point to an ftp-server (for example "service ftp" in headline.

share|improve this answer
    
cool.. this is what I get [root@s87998 xinetd.d]# cat /etc/xinetd.d/ftp_psa service ftp { disable = no socket_type = stream protocol = tcp wait = no user = root instances = UNLIMITED server = /usr/sbin/in.proftpd server_args = -c /etc/proftpd.conf } –  Stewie Apr 13 '11 at 14:45
    
But, when I try to do this: [root@s87998 xinetd.d]# /etc/xinetd.d/ftp_psa status -bash: /etc/xinetd.d/ftp_psa: Permission denied –  Stewie Apr 13 '11 at 14:47
    
Hey, this worked: chkconfig ftp_psa on/off ! Thanks for helping me find out the service name .. –  Stewie Apr 13 '11 at 14:54

You can generally find out the status of a service like this:

service proftpd status

And you can likewise restart (or similarly start and stop) like this:

service proftpd restart
share|improve this answer
    
Already did that earlier, [root@s87998 /]# service proftpd status proftpd: unrecognized service –  Stewie Apr 13 '11 at 14:37
    
It might be called just ftpd on your system. You might be able to browse for the service name by scanning the init.d files: ls /etc/rc.d/init.d/ or wherever your system has those. –  Caleb Apr 13 '11 at 14:40

To stop proftpd

/sbin/service proftpd stop

to stop it from starting with the system

/sbin/chkconfig proftpd off 

to start proftpd with the system

/sbin/chkconfig proftpd on

to manually start proftpd

/sbin/service proftpd start

and to restart it

/sbin/service proftpd restart
share|improve this answer
    
proftpd: unrecognized service –  Stewie Apr 13 '11 at 14:39
    
nice service proftpd restart worked for me =) –  user1259765 Sep 2 '13 at 3:36

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.