vsftpd を起動できません。 vsftpd:rootで始める必要があります

vsftpd を起動できません。 vsftpd:rootで始める必要があります

vsftpd以下のように起動できません。

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

エラーは自明です。マニュアルに記載されているように実行するか、次のオプションをroot使用する必要があります。run_as_launching_uservsftpd.conf

run_as_launching_user vsftpdを起動したユーザーとしてvsftpdを実行するには、YESに設定します。これは、ルートアクセスが利用できない状況で役立ちます。

chroot_local_userこのオプションを有効にすると、現在使用されているオプションとオプションが相互にrun_as_launching_user排他的であるため、セキュリティ上の脅威が発生する可能性があります。

おすすめ記事