FTP サーバー : ProFTPD インストール2025/11/27 |
|
ProFTPD をインストールして、ファイル転送用に FTP サーバーを構築します。 |
|
| [1] | ProFTPD をインストールして設定します。 |
|
www:~ #
zypper -n install proftpd
www:~ #
vi /etc/proftpd/proftpd.conf # 6行目 : 自身のサーバー名に変更 ServerName "www.srv.world" # 77行目 : 変更 (PAM 認証を有効にする) AuthPAM on # 88行目 : 変更 (PAM 認証を有効にする) AuthOrder mod_auth_pam.c* mod_auth_unix.c
www:~ #
vi /etc/pam.d/proftpd
# 新規作成
#%PAM-1.0
auth sufficient pam_ftp.so
auth required pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed
auth required pam_unix.so
auth required pam_shells.so
account required pam_unix.so
password required pam_unix.so
session required pam_unix.so
www:~ #
vi /etc/ftpusers 新規作成 : FTP 接続を禁止したいユーザーを記載 user01 user02 user03www:~ # systemctl enable --now proftpd |
| [2] | SELinux を有効にしている場合は、ブール値の変更が必要です。 |
|
www:~ # setsebool -P ftpd_full_access on |
| [3] | Firewalld を有効にしている場合は、FTP サービスの許可が必要です。 |
|
www:~ # firewall-cmd --add-service=ftp success www:~ # firewall-cmd --runtime-to-permanent success |
| Sponsored Link |
|
|