I have to set up a FTP server on my machine. I have installed vsftpd using the command:

sudo apt-get install vsftpd

I then edited the configuration file vsftpd.conf in the location /etc. The file contains:

#Set the server to run in standalone mode

#Enable anonymous access

#Disable write access

#Set root directory for anon connections

#Limit retrieval rate

#Enable logging user login and file transfers. /var/log/vsftpd.log

#Set interface and port

The IP address is the eth0 for my server. When I run the command

sudo vsftpd /etc/vsftpd.conf

I get the error:

500 OOPS: could not bind listening IPv4 socket

To check to see what was running on port 21, I ran the command:

sudo netstat -tulpn

And saw that vsftpd process id was 29383 so I issued the command:

sudo killserver 29383

And checked again. The vsftpd was still there, but with a different PID. Running the command:

sudo killall vsftpd


sudo killall -9 vsftpd

Does the same thing. I have already tried reinstalling. Anyone know what is going on and how to fix it?

  • An init service was probably installed along with this, and that's what keeps respawning the process. If this is ubuntu or some other upstart based system, check with initctl list | grep vsftp; if it is debian wheezy try grep vsftp /etc/init.d/* (try this with upstart as well in case it used a sysv style script). If you get something, you either need to disable the init service, or use service (debian/sysv) or initctl (ubuntu/upstart) to control it. – goldilocks Feb 16 '15 at 19:06

Remember to comment out


in your vsftpd.conf file so that you don't run your vsftpd in standalone mode

It fixed the problem in my case.

| improve this answer | |

You are getting this error probably because of xinetd ftp is running.

The procedure mentioned below will resolve the following errors:

A) 500 OOPS: could not bind listening IPv4 socket, for vsftpd

B) Server hangup immediately after connect, for ncftpget

Follow the procedure mentioned below to rectify the error:

  • To View which ftp service is running use:

    $ lsof -i | grep ftp (Become root and run this command)
  • To stop xinetd:

    $ sudo service xinetd stop
  • After stoping xinetd restart your vsftpd service by typing :

    $ /etc/init.d/vsftpd restart  (Become root and run this command)
  • Also check the vsftpd.conf with this one:

| improve this answer | |
  • Hi Dasrohith, you can mark this answer useful – Ankit Raj Nov 6 '16 at 17:58

In my case the error was due to the process was running.

Try the next:

$ sudo service vsftpd restart

The service should restart with the new configuration parameters, if any.

| improve this answer | |

If above solutions did not worked then you are in the same situation as I was in. Now let's resolve it.

First make sure to do listen=NO or comment the line that contain listen=YES and must set the port to either 8081 or standard ports. Then type ps -ef then a whole bunch of things appear like :

enter image description here

Then you extract the file in which you are interested in by typing the command :

ps -ef | grep vsftpd

Now, remember the PID number is in second column. Now, copy that number. Now you need to kill the vsftpd beacause it contains previous log and you just modified something into the vsftpd.conf file. Kill command is :

sudo kill <PID>

Ex. sudo kill 5392

Now, You are done with it.Now restart the server it will run perfectly.

| improve this answer | |

In my case, uncommentting the following line in vsftpd.conf solved the problem:

| improve this answer | |

Maybe in the standalone mode,you have started the vsftpd service.And you just need to kill the vsftpd process,not need to change the config file.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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