10个VsFTP(非常安全的文件传输协议)面试问题和答案

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

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/