Sample Header Ad - 728x90

Ubuntu - VSFTPD configuration for FTP fails on restart

1 vote
2 answers
5964 views
I need to set up a FTP server within my Ubuntu virtual box but I'm having problems within configuration of the config file within VSFTPD From online tutorials I keep seeing different options being selected and different reasoning, I just need a simple and secure configuration without enable settings I do not understand. So far I have selected to use the following options within **/etc/vsftpd.conf**
Listen=NO
Anonymous_enable=NO
Local_enable=YES
wrtite_enable=YES
dirmessage_enable=YES
use_localtime=YES
connect_from_port_20=YES
xferlog_enable=YES
ftpd_banner=Welcome to Toms FTP Server.
chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list
From my understanding these options do the following: * listen enables standalone, * anonymous denies non verified login, * write_enable allows to write files, * dirmessage_enable is directory explaining, * use_localtime is the time used for dating files, * connect_from_port_20 is self explanatory, * xferlog_enable is a log creation/format type?, * ftpd_banner is self explanatory, * chroot_local_user specifies users are restricted to their directory, users not restricted to their directory are listed within chroot_list_file. The problem I am having is, I keep seeing references in tutorials regarding a userlist which will state which users do have access like this:
user_sub_token=$USER
local_root=/home/$USER/ftp
userlist_enable=YES
userlist_file=/etc/vsftpd.userlist
userlist_deny=NO
This does not exist in my file and whenever I try to enter it manually it causes my VSFTPD to fail start up when restarting, I see this in almost every tutorial but it is not contained within my configuration files??? Am I trying to configure this wrong? What is the minimum requirements for a safe VSFTPD configuration? Is this user list no-longer supported? Do I even need this user list? error code also does not disappear removing these files and restarting again, it completely breaks the service and requires a re installation every single time, the error code is as follows:
systemctl status vsftpd.service

● vsftpd.service - vsftpd FTP server
   Loaded: loaded (/lib/systemd/system/vsftpd.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2020-04-26 13:58:09 UTC; 14min ago
  Process: 30588 ExecStart=/usr/sbin/vsftpd /etc/vsftpd.conf (code=exited, status=2)
  Process: 30584 ExecStartPre=/bin/mkdir -p /var/run/vsftpd/empty (code=exited, status=0/SUCCESS)
 Main PID: 30588 (code=exited, status=2)

Apr 26 13:58:09 ubuntu systemd: Starting vsftpd FTP server...
Apr 26 13:58:09 ubuntu systemd: Started vsftpd FTP server.
Apr 26 13:58:09 ubuntu systemd: vsftpd.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Apr 26 13:58:09 ubuntu systemd: vsftpd.service: Failed with result 'exit-code'.
Asked by throwaway56786897 (13 rep)
Apr 26, 2020, 02:11 PM
Last activity: Mar 22, 2025, 03:32 AM