10個VsFTP(非常安全的文件傳輸協議)面試問題和答案

FTP代表「文件传输协议」,是互联网上最广泛使用的标准协议之一。FTP采用服务器/客户端架构,用于文件传输。最初,FTP客户端是基于命令行的。现在大多数平台都捆绑了FTP客户端和服务器程序,而且有很多FTP客户端/服务器程序可用。在这里,我们提供了基于Linux服务器上10个面试问题,基于Vsftp(非常安全的文件传输协议)。

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).
chroot_local_user=YES
3. 如何管理连接到您的FTP服务器的FTP客户端数量?

答案: 我们需要设置“max_client参数”。此参数控制连接的客户端数量,如果将max_client设置为0,它将允许无限数量的客户端连接到FTP服务器。最大客户端参数需要在vsftpd.conf中更改,默认值为0。

4. 如何限制FTP登录尝试,以抵御僵尸网络/非法登录尝试?
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.

注意: 為了成功創建和維護日誌,必須啟用參數「xferlog_std_format」。

9. 如何在登錄失敗的情況下禁用登錄幾秒鐘。你將如何實現這一點?
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.
10. 如何在客戶端連接到 FTP 服務器之前顯示特定的文本消息。你將如何完成這個任務?
Answer : We can achieve this by setting ‘banner_file’. We need to set ftpd_banner=/path/to/banner-file in vsftpd.conf file.

FTP 是一個非常有用的工具,它非常龐大而且非常有趣。此外,從面試的角度來看,它也是有用的。我們費心為您帶來了這些問題,並將在我們未來的文章中涵蓋更多的問題。在那之前,請保持關注並與 Tecmint 保持聯繫。

閱讀更多: 10 個高級 VsFTP 面試問題和答案 – 第二部分

Source:
https://www.tecmint.com/ftp-interview-questions-and-answers/