FTPは、インターネット上で利用可能な最も広く使用されている標準プロトコルの1つである「File Transfer Protocol」の略です。FTPはサーバー/クライアントアーキテクチャで動作し、ファイルの転送に使用されます。最初はFTPクライアントはコマンドラインベースでしたが、現在はほとんどのプラットフォームにFTPクライアントおよびサーバープログラムがバンドルされており、多くのFTPクライアント/サーバープログラムが利用可能です。ここでは、Linuxサーバー上の10の面接質問に基づいてVsftp(Very Secure File Transfer Protocol)を紹介しています。
10 VsFTP Interview Questions
1. TFTPとFTPサーバーの違いは何ですか?
Answer :TFTP is File Transfer Protocol which usages User Datagram Protocol (UDP) whereas FTP usages Transmission Control Protocol (TCP). TCP usages port number 20 for Data and 21 for control by default whereas TFTP usages port 69 by default.
注意:簡単に言うと、データと制御の区別が必要ない場合、FTPはデフォルトでポート21を使用します。
2. ユーザーを制限し、ホームディレクトリを超えてブラウジングを禁止する方法は?
Answer :Yes! It is possible to restrict users to their home directories and browsing beyond home directories. This can be done by enabling chroot option in ftp configuration file (i.e. vsftpd.conf).
Answer :We need to edit ‘max_login_fails parameter’. This parameter manages the maximum number of login attempts before the session is killed. The default value is ‘3’ which means a maximum of ‘3’ login attempts are possible failing which the session will be killed.
5. 匿名ユーザーからFTPサーバーへのファイルアップロードを有効にする方法は?
Answer :Anonymous users can be allowed to upload files to FTP server by modifying parameter ‘anon_upload_enable’. If Value of anon_upload_enable is set to Yes, Anonymous users are permitted to upload files. In order to have a working anonymous upload, we must have parameter ‘write_enable’ activated. The Default Value is NO, which means anonymous upload is disabled.
6. FTPサーバーからのダウンロードを無効にする方法は?
Answer :Disabling Downloads from FTP Server can be implemented by modifying the parameter ‘download_enable’. If set to NO, all download request will be denied. The Default value is YES which Means, Downloading is Enabled.
7. ローカルユーザーにFTPログインを有効化および許可する方法は?
Answer :The parameter ‘Local_enable’ is responsible for managing local users login. In order to activate local users login, we must set ‘local_enable=yes’ in file vsftpd.conf. The default value is NO, which means Local User Login is not permitted.
8. FTPリクエストとレスポンスのログを維持することは可能ですか?
Answer :Yes! We can log FTP requests and responses. What we need to do is to modify the binary value of parameter ‘log_ftp_protocol’. If set to Yes, it will log all the requests, responses. The log may be very useful in Debugging. The default value of above parameter is NO which means no logs are maintained by default.
Answer :The number of seconds we need to pause in case of failed login attempt can be achieved by modifying the value of parameter ‘delay_failed_login’. The default value is 1.