Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to stop ftp and remove the service on Ubuntu 14.04

I tried sudo apt-get remove ftp and checked using command ps aux | grep ftp but the service was still running.

Please suggest some way to stop it.

share|improve this question
    
Which FTP service did you install ? –  NGRhodes Jun 9 at 10:30
    
Frankly speaking, I have not installed ftp service (or dont know if anyone else installed on it). I installed Ubuntu 14.03 on my new laptop. After executing command "ps aux | grep ftp" i am getting output "<machinename> 5587 0.0 0.0 15940 920 pts/6 S+ 13:31 0:00 grep --color=auto ftp". Can you please suggest a way to check which ftp service is running. While doing troubleshooting i executed remove command for vsftpd, proftpd,.... etc. –  keshav Jun 9 at 11:43
    
Sorry for the confusion, but I have realised you have made a mistake, see my new answer below. –  NGRhodes Jun 9 at 12:09

3 Answers 3

up vote 2 down vote accepted

I don't know why I did not spot this earlier. I've left my other answer alone to avoid confusion

There is no FTP service

What you are seeing when you are running ps aux | grep ftp is the process of the same command.

There are better ways of searching the process using the commands pgrep or pidof. Simple way to run these:

pgrep ftp
pidof ftp

In both cases will simply return the PID if there is a process running of the name given or nothing if no process found of the given name.

share|improve this answer
    
Thanks @NGRhodes. After executing above commands i do not found any ftp service. It conclude that ftp is not running on my machine. But do you know why i am getting output to "ps aux | grep ftp" ? –  keshav Jun 9 at 13:33
    
The command is finding itself in the process list :) –  NGRhodes Jun 9 at 13:42

To stop the service:

sudo service vsftpd stop

To remove the service

sudo apt-get remove vsftpd
share|improve this answer
    
Thanks for the answer. I tried command to stop but i am getting output as "vsftp: unrecognized service". –  keshav Jun 6 at 11:31
    
Hi its vsftpd not vsftp, answer has been updated –  NGRhodes Jun 6 at 12:30
    
same output for vsftpd :( "vsftpd: unrecognized service" –  keshav Jun 9 at 8:04

First of all you will have to identify which FTP server you are running because there are a lot (vsftpd, pro-ftpd, ...). I suggest that you do dpkg -l|grep ftpd to see which FTP daemon is installed. The name of the service to use is usually the name of the displayed package without the version number, e.g. proftpd or pure-ftpd or anything other depending of your installation.

When you have identified in the output the name of the FTP server package, just do :

sudo stop <name>

if you get an error like <name>: unknown job this is because is not upstart enabled. Then simply try :

sudo service <name> stop

Then, just remove the package using the standard command :

sudo apt-get remove <name>

or (if you want to get rid of all config files and so on) :

sudo apt-get purge <name>
share|improve this answer
    
Tried command "dpkg -l|grep ftpd" but not getting any output. When i am executing an command "ps aux | grep ftp" i am getting output "<username>+ 5587 0.0 0.0 15940 920 pts/6 S+ 13:31 0:00 grep --color=auto ftp" –  keshav Jun 9 at 8:06
1  
The you have no FTP server running nor installed. –  Benoit Jun 10 at 9:57

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.