Linux FTP (vsftpd) Interview Questions & Answers


In Linux Like operating system vsftpd(Very Secure FTP Daemon) is ftp server , which provides the features of downloading and uploading files to the ftp space. Now we will discuss most common ftp server interview questions along with the Answers.


Q:1 What does VSFTPD Stands for ?
Ans: VSFTPD stands for Very Secure FTP Daemon.

Q:2 What are the defaults ports used in linux ftp server ?
Ans: Port 20 – This is the data transfer port. All the all subsequent data transfers between the client and server are done using this port.
Port 21 – On this port control connection is established. All commands we send and the ftp server’s responses to those commands will go over the control connection, but any data sent back (such as “ls” directory lists or actual file data in either direction) will go over the data connection.

Q:3 What are most common features of vsftpd ?
Ans: some of the Common Features are listed below :
·         Virtual IP configurations
·         Virtual users
·         Standalone or inetd operation
·         Powerful per-user configurability
·         Bandwidth throttling
·         Per-source-IP configurability
·         Per-source-IP limits
·         IPv6
·         Encryption support through SSL integration

Q:4 What is the configuration file of vsftpd ?
Ans: ‘/etc/vsftpd/vsftpd.conf’

Q:5 How to restart the service of ftp server in linux ?
Ans: Service vsftpd restart or /etc/init.d/vsftpd restart

Q:6 What is Passive mode?
Ans: Passive mode, like active mode, is initiated by the FTP client application. When requesting data from the server, the FTP client indicates it wants to access the data in passive mode and the server provides the IP address and a random, unprivileged port (greater than 1024) on the server. The client then connects to that port on the server to download the requested information.

Q:7 How to allow Anonymous FTP ?
Ans: Anonymous FTP is enabled by default by setting the anonymous_enable directive in /etc/vsftpd/vsftpd.conf to YES.

Q:8 Which Users are not allowed to login via ftp ? or How to deny specific users access to the FTP server?
Ans: Users mentioned in the file ‘/etc/vsftpd/ftpusers’ are not allowed to login via ftp.

Q:9 I want to copy multiple files without prompting for any info, how can I do that one?
Ans: ftp -i ftpserver

Q:10 How to disable standard ftpd xferlog log format and enable default vsftpd log ?
Ans : Edit the file ‘ /etc/vsftpd/vsftpd.conf’ & make the below changes:
·         xferlog_std_format=NO
·         log_ftp_protocol=YES
The default vsftpd log file is /var/log/vsftpd.log

Q:11 Local users cannot log in. How to resolve this issue?
Ans: Check "local_enable=YES" in your /etc/vsftpd/vsftpd.conf to allow local users to log in.

Q:12 What is default directory for ftp / Anonymous user ?
Ans : ‘/var/ftp’ is the default directory for ftp or Anonymous user

Q:13 How to change the default directory for ftp / Anonymous user ?
Ans: Edit the file ‘/etc/vsftpd/vsftpd.conf’ and change the below directive :
·         anon_root=/<Path-of-New-Directory>
After making above change either restart or reload vsftpd service.

Q:14 How to disable Anonymous user in vsftpd ?
Ans: Edit the conf file ‘/etc/vsftpd/vsftpd.conf’ and chnage below directive and restart the ftp service.
·         anonymous_enable=NO

Q:15 How to enable Anonymous downloads, but disable permission to write?
Ans: In the above said scenario, we need to edit the parameter ‘anon_world_readable_only’. The parameter should be enabled and set to ‘YES’. The default value is YES.

Q:16 How to CHMOD all Anonymous uploads automatically. How would you do?
Ans: To chmod all anonymous uploads automatically, we need to edit the parameter ‘chmod_enable’ and set it to ‘YES’. Anonymous users never get to use SITE CHMOD. The default value is YES.

 Q:17 How to disable directory listing in a FTP server?
Ans: The parameter ‘dirlist_enable’ comes to rescue at this point. The value of ‘dirlist_enable’ should be set to NO. The default value is YES.

Q:18 How to maintain sessions for logins of VSFTP. How will you do?
Ans: The parameter ‘session_support’ needs to be modified. This parameter controls and manages vsftp attempts to maintain session for logins. The default value is NO.

Q:19 How will you limit the maximum transfer rate from VSFTP server?
Ans: To limit the maximum transfer rate of VSFTP server we need the parameter ‘anon_max_rate’ in bytes per second, for anonymous client. The default value is 0 which means unlimited.

Q:20 How will you timeout the idle session of VSFTP?
Ans: The parameter ‘idle_session_timeout’ needs to be modified here. The timeout in second, which is the maximum time an anonymous user can spend in a session between his client machine and VSFTP server. As soon as the the timeout triggers, the client is logged out. The default time is 300.

Q:21 Explain directive "session_support”?
Ans: When enabled, vsftpd attempts to maintain login sessions for each user through Pluggable Authentication Modules (PAM).

Q:22 What is chroot environment in ftp server ?
Ans: chroot environment prevents the user from leaving its home directory means jail like environment where users are limited to their home directory only. It is the addon security of ftp server.

Q:23 How to enable chroot environment in vsftpd server ?
Ans: To enable chroot environment edit the file ‘/etc/vsftpd/vsftpd.conf’ and enable the below directives :
·         chroot_list_enable=YES
·         chroot_list_file=/etc/vsftpd.chroot_list
The chroot_list_file variable specifies the file which contains users that are chroot.

Q:24 How to enable only limited/allowed users are able to login via ftp ?
Ans: This can be done by editing the file ‘/etc/vsftpd/vsftpd.conf’ and add the below directives :
·         userlist_enable=YES
·         userlist_file=/etc/vsftpd.user_list
·         userlist_deny=NO
The file specified by userlist_file will now contain users that are able to login.

Q:25 How to set ftp banner in linux ?
Ans: Open the file ‘/etc/vsftpd/vsftpd.conf’ and set the below directive :
·         ftpd_banner= “Enter New Banner Here”

Q:26 How To limit the data transfer rate, number of clients & connections per IP for local users ?
Ans: Edit the ftp server’s config file(/etc/vsftpd/vsftpd.conf) and set the below directives :
·         local_max_rate=1000000 # Maximum data transfer rate in bytes per second
·         max_clients=50 # Maximum number of clients that may be connected
·         max_per_ip=2 # Maximum connections per IP

Q:27 What is meaning of max_clients parameter ?

Ans: Maximum number of clients that can connect at one time. If set to 0, the number of clients is unlimited.


.....Best Of Luck.....



Post a Comment