vsftpd won't start: "systemd[1]: vsftpd.service: main process exited, code=exited, status=2/INVALIDARGUMENT"
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 stopping xinetd restart your vsftpd service by typing
$ /etc/init.d/vsftpd restart
I've reset the permissions for /etc/vsftpd.conf
to root:root
via sudo chown root:root /etc/vsftpd.conf
and now the vsftpd
server get started via sudo systemctl restart vsftpd.service
and running it manually via sudo /usr/bin/vsftpd
.