Monday, 26 June 2017

Linux FTP (vsftpd) Interview Questions & 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. 

Q:3 What are most common features of vsftpd ?
Ans:some of the Common Features are listed below :

Virtual IP configurations
Virtual users
Bandwidth throttling
Per-source-IP configurability
Per-source-IP limits
IPv6
Encryption support through SSL integration
Standalone or inetd operation
Powerful per-user configurability                                                                                                      
4).What is the difference between TFTP and FTP servers?
A) Both are file transfer servers but slight difference is TFTP server uses UDP protocol and FTP uses TCP protocol. TFTP is good for slow connection paths.A) Both are file transfer servers but slight difference is TFTP server uses UDP protocol and FTP uses TCP protocol. TFTP is good for slow connection paths.
5) What is the port no for TFTP?
A) 69.
6) How to restrict users to their home directories?
A) By setting up “chroot_local_user=YES”.

7) How to restrict total number of users accessing FTP server?

A) If you run vsftpd in “standalone” mode with the “setting listen=YES”, then
you can investigate the setting (e.g.) : “max_clients=10”

8) I want to copy multiple files without prompting for any info, how can I do that one?
A) Simply do “ftp -i ftpserver” this command will suppress any info displayed on ftp server.
or you can just type prompt ftp prompt to suppress info messages have a look here.
Q:9 What is the configuration file of vsftpd ?
Ans: ‘/etc/vsftp/vsftpd.conf’

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

Q:11 Which Users tare not allowed to login via ftp ?
Ans: Users mentioned in the file ‘/etc/vsftpd/ftpusers’ are not allowed to login via ftp.

Q:12 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:13 How do we integrate with LDAP users and login?
A) Use vsftpd’s( Very Secure FTPD) PAM(Pluggable Authentication Modules) integration to do this, and have PAM authenticate against an LDAP repository.
Q:14 How to restrict different users with different permissions in vsftpd
A) By setting up “user_config_dir” entry in “vsftpd.conf”.
Q:15 How to change vsftpd default port?
A) By setting “listen_port” directive  in “vsftpd.conf”
Q:16 How to disable certain FTP commands?
A) There are some individual settings (e.g. dirlist_enable) or you can specify a complete set of allowed commands with “cmds_allowed”.
Q:17 What is default directory for ftp (OR) Anonymous user ?
Ans : /var/ftp is the default directory for ftp or Anonymous user

Q:18 How to change the default directory for ftp (OR) Anonymous user ?
Ans: Edit the file ‘/etc/vsftpd/vsftpd.conf’ and change the below directive :
                anon_root=/
                Restart the service
                 service vsftpd restart 

Q:19 How to disable Anonymous user in vsftpd ?
Ans: Edit the conf file ‘/etc/vsftpd/vsftpd.conf’ and change below directive and restart the ftp service.
anonymous_enable=NO
Q:20 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:21 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:22 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:23 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:24 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_per_ip=2 # Maximum connections per IP
Q:25 Does vsftpd support IPv6?
A) Yes, as of “version 1.2.0”.
max_clients=50 # Maximum number of clients that may be connected

No comments:
Write comments

Thank you for your feedback