vsftpd-cannot read config file even when file exists

Solution 1:

I had the same symptoms while trying to start vsftpd on an Ubuntu 16.04. In my case it was enough to comment out this line in /etc/vsftpd.conf:

listen_ipv6=YES

I don't know why i does not work with ipv6 for me, but I have no need for IP-v6 and disabling it solved the problem in my case.

Solution 2:

step 1 : check the vsftpd.conf

listen=YES
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/private/vsftpd.pem

Step 2 : To View which ftp service is running use

$ lsof -i | grep ftp

step 3 : To stop xinetd

$ sudo service xinetd stop

Step 4: After stoping xinetd restart your vsftpd service by typing

$ /etc/init.d/vsftpd restart

Solution 3:

In addition to some of the other solutions (listen_ipv6=NO and listen=YES), mine was failing with the same error because I had included comments after the things I had modified:

listen_ipv6=NO  # modified

That was also causing the same status=2/INVALIDARGUMENT error. Could only figure it out by running the daemon directly:

$ sudo /usr/sbin/vsftpd /etc/vsftpd.conf 
500 OOPS: bad bool value in config file for: listen_ipv6

Neither systemctl/service nor /var/log/vsftpd.log were any use.

Solution was to remove the trailing comment:

listen_ipv6=NO