Sample Header Ad - 728x90

vsftpd fails to start due to configuration error: "status=2/INVALIDARGUMENT" in vsftpd.service

0 votes
1 answer
6386 views
I am configuring with Ansible a VM running Ubuntu to run this FTP server: vsftpd, however after the installation when I inspect the logs with journalctl -u vsftpd.service I see:
Nov 20 17:49:58 my-vm systemd: Starting vsftpd FTP server...
Nov 20 17:49:58 my-vm systemd: Started vsftpd FTP server.
Nov 20 17:50:06 my-vm systemd: Stopping vsftpd FTP server...
Nov 20 17:50:06 my-vm systemd: Stopped vsftpd FTP server.
Nov 20 17:50:06 my-vm systemd: Starting vsftpd FTP server...
Nov 20 17:50:06 my-vm systemd: Started vsftpd FTP server.
Nov 20 17:50:06 my-vm systemd: vsftpd.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Nov 20 17:50:06 my-vm systemd: vsftpd.service: Failed with result 'exit-code'.
I am not sure what's wrong with the configuration I am setting at /etc/vsftpd.conf, this:
anonymous_enable=NO        # disable anonymous login
local_enable=YES           # permit local logins
write_enable=YES           # enable FTP commands which change the filesystem
local_umask=022            # value of umask for file creation for local users
dirmessage_enable=YES      # enable showing of messages when users first enter a new directory
xferlog_enable=YES         # a log file will be maintained detailing uploads and downloads
connect_from_port_20=YES   # use port 20 (ftp-data) on the server machine for PORT style connections
xferlog_std_format=YES     # keep standard log file format
listen=NO                  # prevent vsftpd from running in standalone mode
listen_ipv6=YES            # THIS DOES NOT FIX THE FOLLWING: 'journalctl -u vsftpd.service' gives: 'vsftpd.service: Main process exited, code=exited, status=2/INVALIDARGUMENT'
pam_service_name=vsftpd    # name of the PAM service vsftpd will use
userlist_enable=YES        # enable vsftpd to load a list of usernames
tcp_wrappers=YES           # turn on tcp wrappers
ls_recurse_enable=YES      # allow to recursively inspect the file system (no problem with heavy I/O)
chroot_local_user=YES      # local users limited to their home directories after login (chroot jail)
allow_writeable_chroot=YES # allow chroot jail for local users to be writable
pasv_enable=YES            # enable passive connections
pasv_min_port=10000        # passive connections port range
pasv_max_port=10100        # passive connections port range
ssl_enable=YES             # enable FTPS
ssl_tlsv1=YES              # only TLS (not old SSL standards)
ssl_sslv2=NO               # only TLS (not old SSL standards)
ssl_sslv3=NO               # only TLS (not old SSL standards)
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
- How can I make that FTP server daemon running without errors? - What's wrong with the configuration file?
Asked by TPPZ (637 rep)
Nov 20, 2019, 05:58 PM
Last activity: Jun 27, 2025, 05:02 PM