0

I can't start my vsftpd, as shown below:

guoyanzhang@debian:~$ sudo service vsftpd status
● vsftpd.service - vsftpd FTP server
    Loaded: loaded (/lib/systemd/system/vsftpd.service; enabled; vendor preset: enabled)
    Active: failed (Result: exit-code) since Wed 2020-08-05 15:47:07 HDT; 1min 30s ago
    Process: 4066 ExecStartPre=/bin/mkdir -p /var/run/vsftpd/empty (code=exited, status=0/SUCCESS)
    Process: 4067 ExecStart=/usr/sbin/vsftpd /etc/vsftpd.conf (code=exited, status=2)
    Main PID: 4067 (code=exited, status=2)

Aug 05 15:47:07 debian systemd[1]: Starting vsftpd FTP server...
Aug 05 15:47:07 debian systemd[1]: Started vsftpd FTP server.
Aug 05 15:47:07 debian systemd[1]: vsftpd.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Aug 05 15:47:07 debian systemd[1]: vsftpd.service: Failed with result 'exit-code'.
guoyanzhang@debian:~$ sudo vim /etc/vsftpd.conf
guoyanzhang@debian:~$ /etc/init.d/vsftpd restart
[....] Restarting vsftpd (via systemctl): vsftpd.service====AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to restart 'vsftpd.service'.
Authenticating as: root
Password:
==== AUTHENTICATION COMPLETE ===
. ok
guoyanzhang@debian:~$ /usr/sbin/vsftpd /etc/vsftpd.conf
500 OOPS: vsftpd: must be started as root (see run_as_launching_user option)
guoyanzhang@debian:~$ sudo cat /etc/vsftpd.conf
#begin my configurations
listen=YES
listen_address=192.168.1.108
connect_from_port_20=YES
anonymous_enable=NO
chroot_local_user=YES
use_localtime=YES
local_enable=YES 
local_root=/home/guoyanzhang/share/myftp
xferlog_enable=YES
local_umask=022
#end my configurations
1
  • run vsftpd as root Commented Aug 6, 2020 at 2:24

1 Answer 1

1

The error is self-explanatory. You must run either as root or use run_as_launching_user option as vsftpd.conf manual says:

run_as_launching_user Set to YES if you want vsftpd to run as the user which launched vsftpd. This is useful where root access is not available.

Pls note that enabling this option could be a security threat since chroot_local_user option you currently use and run_as_launching_user option are mutually exclusive

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .