Linux FTPサーバに匿名ユーザーanomnymousの設定を行う方法

環境
# cat/etc/redhat-release
CentOS Stream release 8

操作方法
1.FTPサーバ側の設定
vsftpd.confの編集
vsftpdの設定変更はvsftpd.confを編集することで行います。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# vi /etc/vsftpd/vsftpd.conf
anonymous_enable=YES
# vi /etc/vsftpd/vsftpd.conf anonymous_enable=YES
# vi /etc/vsftpd/vsftpd.conf
anonymous_enable=YES

項目説明
anonymous_enable 匿名ユーザーによるFTPログインの許可/不許可を指定。

2.FTPクライアント確認
以下は、FTPサーバーのIPアドレスが「192.168.1.141」の場合のコマンド例です。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
> ftp 192.168.1.141
192.168.1.141 に接続しました。
220 (vsFTPd 2.2.2)
ユーザー (192.168.1.141:(none)): anonymous
331 Please specify the password.
パスワード:
230 Login successful.
ftp>
> ftp 192.168.1.141 192.168.1.141 に接続しました。 220 (vsFTPd 2.2.2) ユーザー (192.168.1.141:(none)): anonymous 331 Please specify the password. パスワード: 230 Login successful. ftp>
> ftp 192.168.1.141
192.168.1.141 に接続しました。
220 (vsFTPd 2.2.2)
ユーザー (192.168.1.141:(none)): anonymous
331 Please specify the password.
パスワード:
230 Login successful.
ftp>

ftpコマンドを実行すると、FTPサーバーに接続します。接続に成功するとユーザー名とパスワードの入力が求められます。
匿名ユーザーでログインするためユーザー名に「anonymous」と入力します。パスワードは空欄のままEnterキーを押下します。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
ログインに成功すると、FTPのコマンドラインインタプリタが起動し、ユーザーからFTPコマンドを受け付けられる状態となります
ログインに成功すると、FTPのコマンドラインインタプリタが起動し、ユーザーからFTPコマンドを受け付けられる状態となります
ログインに成功すると、FTPのコマンドラインインタプリタが起動し、ユーザーからFTPコマンドを受け付けられる状態となります
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
ftp> pwd
257 "/" is the current directory
ftp> pwd 257 "/" is the current directory
ftp> pwd
257 "/" is the current directory

 

CentOS8

Posted by arkgame