FTPサーバー · 2 min read · Sep 23, 2025

Ubuntu 22.04にProFTPDとTLS/SSLを使用してFTPサーバーをインストールする方法

ProFTPDは、UnixおよびUnix系オペレーティングシステム用に書かれた無料のオープンソースで機能豊富なFTPサーバーです。これは、安全で高性能かつ高度に構成可能なファイル転送プロトコルであり、インターネットを介してファイルをアップロードおよびダウンロードすることができます。これはオープンソースソフトウェアであり、安全な接続のためにTLS(SSL)をサポートしています。

このチュートリアルでは、Ubuntu 22.04にProFTPD FTPサーバーをインストールする方法を示します。

前提条件

  • Ubuntu 22.04を実行しているサーバー。
  • サーバーにルートパスワードが設定されていること。

Ubuntu 22.04にProFTPDをインストールする

デフォルトでは、ProFTPDパッケージはUbuntuのデフォルトリポジトリに含まれています。次のコマンドを使用して簡単にインストールできます:

apt install proftpd -y

ProFTPDパッケージがインストールされたら、次のコマンドを使用してProFTPDサービスを開始します:

systemctl start proftpd

次のコマンドを使用してProFTPDのステータスを確認できます:

systemctl status proftpd

次の出力が得られます:

? proftpd.service - ProFTPD FTP Server
     Loaded: loaded (/lib/systemd/system/proftpd.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2022-10-11 14:33:27 UTC; 16s ago
   Main PID: 5668 (proftpd)
      Tasks: 1 (limit: 2242)
     Memory: 4.4M
        CPU: 57ms
     CGroup: /system.slice/proftpd.service
             ??5668 "proftpd: (accepting connections)" "" "" "" "" "" "" "" "" "" "" "" "" "" ""

Oct 11 14:33:26 ubuntu2204 systemd[1]: Starting ProFTPD FTP Server...
Oct 11 14:33:26 ubuntu2204 proftpd[5666]: Checking syntax of configuration file
Oct 11 14:33:27 ubuntu2204 systemd[1]: proftpd.service: Can't open PID file /run/proftpd.pid (yet?) after start: Operation not permitted
Oct 11 14:33:27 ubuntu2204 systemd[1]: Started ProFTPD FTP Server.

次のコマンドを使用してProFTPDのバージョンを確認できます:

proftpd --version

次の出力が得られるはずです:

ProFTPD Version 1.3.7c

FTPユーザーを作成する

次に、FTP用のユーザーを作成する必要があります。次のコマンドを使用して作成できます:

adduser ftpuser

以下のように、このユーザーのパスワードを設定します:

Adding user `ftpuser' ...
Adding new group `ftpuser' (1000) ...
Adding new user `ftpuser' (1000) with group `ftpuser' ...
Creating home directory `/home/ftpuser' ...
Copying files from `/etc/skel' ...
New password: 
Retype new password: 
passwd: password updated successfully
Changing the user information for ftpuser
Enter the new value, or press ENTER for the default
    Full Name []: 
    Room Number []: 
    Work Phone []: 
    Home Phone []: 
    Other []: 
Is the information correct? [Y/n] Y

FTP用のSSL/TLSを生成する

FTP接続をSSL/TLSで保護するには、ProFTPD用のSSL/TLSを生成する必要があります。

まず、次のコマンドを使用してOpenSSLパッケージをインストールします:

apt-get install openssl -y

次に、次のコマンドを使用してSSL/TLS証明書を生成します:

openssl req -x509 -newkey rsa:1024 -keyout /etc/ssl/private/proftpd.key -out /etc/ssl/certs/proftpd.crt -nodes -days 365

以下のように証明書情報を提供するように求められます:

......................++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
.++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:IN
State or Province Name (full name) [Some-State]:GUJ
Locality Name (eg, city) []:JUN
Organization Name (eg, company) [Internet Widgits Pty Ltd]:IT
Organizational Unit Name (eg, section) []:ITC
Common Name (e.g. server FQDN or YOUR name) []:HITESH
Email Address []:[email protected]

次に、生成された証明書に適切な権限を設定します:

chmod 600 /etc/ssl/private/proftpd.key  
chmod 600 /etc/ssl/certs/proftpd.crt

ProFTPDを構成する

次に、ProFTPDの構成ファイルを編集し、デフォルト設定を変更する必要があります:

nano /etc/proftpd/proftpd.conf

次の構成を変更します:

UseIPv6 on
ServerName "FTP Server"
Port 21
RequireValidShell on
AuthOrder mod_auth_pam.c* mod_auth_unix.c
Include /etc/proftpd/tls.conf

ファイルを保存して閉じたら、TLS構成ファイルを編集し、SSL証明書を定義します:

nano /etc/proftpd/tls.conf

次の行を変更します:

TLSEngine                               on
TLSRSACertificateFile                   /etc/ssl/certs/proftpd.crt
TLSRSACertificateKeyFile                /etc/ssl/private/proftpd.key
TLSLog /var/log/proftpd/tls.log
TLSProtocol SSLv23
TLSRequired on

ファイルを保存して閉じたら、変更を適用するためにProFTPDサービスを再起動します:

systemctl restart proftpd

ProFTPDサーバーにアクセスする

この時点で、ProFTPDサーバーはインストールされ、SSL/TLSで保護されています。次に、FileZilla FTPクライアントを使用してアクセスする時が来ました。

リモートシステムに移動し、FileZillaを開きます。次の画面が表示されるはずです:

FileZilla

新しい接続を作成をクリックします。次の画面が表示されるはずです:

FTPサーバー設定

FTPサーバーのIP、ポート、ユーザー名、パスワードを入力し、接続ボタンをクリックします。FTP接続が確立されると、次の画面が表示されるはずです:

FTPサーバーに接続

結論

おめでとうございます!Ubuntu 22.04にProFTPDを正常にインストールし、SSL/TLSで保護しました。これで、安全な接続を介してFTPサーバーにファイルを簡単にアップロードおよびダウンロードできます。質問があればお気軽にお尋ねください。

Share: X/Twitter LinkedIn

新しい投稿を受信箱で受け取る

スパムはありません。いつでも購読を解除できます。