How to stop and remove ftp service?
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.
To stop the service:
sudo service vsftpd stop
To remove the service
sudo apt-get remove vsftpd
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.
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>