Up vsftpd 作成: 2021-01-26
更新: 2021-02-04


    vsftpd を Raspberry Pi にインストールして ftpサーバを立てる


  • インストール
      $ sudo apt install vsftpd


  • /etc/vsftpd.conf を編集
      $ sudo vi /etc/vsftpd.conf

        write_enable=YES (デフォルトは #)
        local_umask=022 (デフォルトは #)
        ascii_upload_enable=YES (デフォルトは #)
        ascii_download_enable=YES (デフォルトは #)
        chroot_local_user=YES (デフォルトは #)
        chroot_list_enable=YES (デフォルトは #)
        chroot_list_file=/etc/vsftpd.chroot_list (デフォルトは #)


  • /etc/vsftpd.chroot_list を編集
      $ sudo vi /etc/vsftpd.chroot_list
        ユーザ「pi」を入力する


  • ftp サーバの実行・再起動・停止
      $ sudo service vsftpd start
      $ sudo service vsftpd restart
      $ sudo service vsftpd stop
    $ ps -ef|grep ftp root 10155 1 0 21:07 ? 00:00:00 /usr/sbin/vsftpd /etc/vsftpd.conf
  • 接続テスト
      PC から ftp


  • 電源投入時自動起動の設定
    vsftpd のインストールは,自動起動の設定を含んでいる:
      $ systemctl list-unit-files | grep vsftpd vsftpd.service enabled enabled
    自動起動を無効にするときは
      $ sudo systemctl disable vsftpd



$ sudo apt-get install vsftpd Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: vsftpd 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 137 kB of archives. After this operation, 306 kB of additional disk space will be used. Get:1 http://ftp.jaist.ac.jp/pub/Linux/raspbian-archive/raspbian buster/main armhf vsftpd armhf 3.0.3-12 [137 kB] Fetched 137 kB in 2s (87.0 kB/s) Preconfiguring packages ... Selecting previously unselected package vsftpd. (Reading database ... 163637 files and directories currently installed.) Preparing to unpack .../vsftpd_3.0.3-12_armhf.deb ... Unpacking vsftpd (3.0.3-12) ... Setting up vsftpd (3.0.3-12) ... Created symlink /etc/systemd/system/multi-user.target.wants/vsftpd.service → /lib/systemd/system/vsftpd.service. [vsftpd.conf:1] Line references path below legacy directory /var/run/, updating /var/run/vsftpd/empty → /run/vsftpd/empty; please update the tmpfiles.d/ drop-in file accordingly. Processing triggers for man-db (2.8.5-2) ... Processing triggers for systemd (241-7~deb10u5+rpi1) ...