0

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[1]: Starting vsftpd FTP server...
Nov 20 17:49:58 my-vm systemd[1]: Started vsftpd FTP server.
Nov 20 17:50:06 my-vm systemd[1]: Stopping vsftpd FTP server...
Nov 20 17:50:06 my-vm systemd[1]: Stopped vsftpd FTP server.
Nov 20 17:50:06 my-vm systemd[1]: Starting vsftpd FTP server...
Nov 20 17:50:06 my-vm systemd[1]: Started vsftpd FTP server.
Nov 20 17:50:06 my-vm systemd[1]: vsftpd.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Nov 20 17:50:06 my-vm systemd[1]: 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?
  • This question/answer indicates that ownership/permissions of /etc/vsftpd.conf fixed their problem. Does it fix yours? – Jeff Schaller Dec 19 '19 at 14:17
  • Also, manually running it via sudo /usr/sbin/vsftpd /etc/vsftpd.conf can give more (useful) output. – Jeff Schaller Dec 19 '19 at 14:18

Your Answer

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

Browse other questions tagged or ask your own question.