8

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 ?

2
  • 1
    Have you checked /etc/xinetd.conf, it is possible to put the configuration there as opposed to /etc/xinetd.d/* Apr 13, 2011 at 14:20
  • I checked it. There is nothing in the xinetd.conf except for the default template defaults{}
    – Stewie
    Apr 13, 2011 at 14:22

5 Answers 5

6

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.

4
  • 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, 2011 at 14:26
  • 1
    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, 2011 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, 2011 at 14:48
  • Thanks, finally this worked: chkconfig ftp_psa on/off ..
    – Stewie
    Apr 13, 2011 at 14:55
4

If your server has Plesk ProFTPD daemon is xinetd. Use

/etc/init.d/xinetd restart

1

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
2
  • proftpd: unrecognized service
    – Stewie
    Apr 13, 2011 at 14:39
  • 1
    nice service proftpd restart worked for me =) Sep 2, 2013 at 3:36
1

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.

3
  • 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, 2011 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, 2011 at 14:47
  • Hey, this worked: chkconfig ftp_psa on/off ! Thanks for helping me find out the service name ..
    – Stewie
    Apr 13, 2011 at 14:54
0

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
2
  • Already did that earlier, [root@s87998 /]# service proftpd status proftpd: unrecognized service
    – Stewie
    Apr 13, 2011 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, 2011 at 14:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .