FTP Interview Questions & Answers part 2


Q: – On which port VSFTP server works ?

FTP uses two ports, 20 and 21. By default, the FTP server listens for requests on port 21. After a connection is established, the client sends commands to the server on port 21. However, port 20 is used when the server sends data back to the client.

Q: – How to restart VSFTP server ?

service vsftpd restart

Q: – How to allow Anonymous FTP ?

Anonymous FTP is enabled by default by setting the anonymous_enable directive in /etc/vsftpd/vsftpd.conf to YES.

Q: – What is Passive mode?

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: – Explain directive "session_support”?

When enabled, vsftpd attempts to maintain login sessions for each user through Pluggable Authentication Modules (PAM).

Q: – What is FTP ?

FTP client connects to the FTP server by establishing an FTP control connection to port 21 of the server. Your commands such as 'ls' and 'get' are sent over this connection. Whenever the client requests data over the control connection, the server initiates data transfer connections back to the client. The source port of these data transfer connections is always port 20 on the server, and the destination port is a high port (greater than 1024) on the client.

Q: – How to deny specific users access to the FTP server ?

To deny specific users access to the FTP server, add their usernames to the /etc/vsftpd/
ftpusers file. By default, system users such as root and nobody are included in this list.

Q: – Can we create logs for ftp authenticated sessions ?

Yes, If the xferlog_enable directive in vsftpd.conf is set to YES, file transfers using the FTP protocol are logged to /var/log/xferlog. Information such as a time stamp, IP address of the client, the file being transferred, and the username of the person who authenticated the connection is included in the log entry.

Q: – What is meaning of max_clients parameter ?

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

Submitted By:-Naveen Kumar            Email-ID: – naveenkumar.13@ibibo.com