Tuesday 10 July 2012



FTP Server Interview Questions And Answers for Linux admin

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.



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 FTP ?

FTP stands for File Transfer Protocol. An FTP server allows clients to connect to it either
anonymously or with a username and password combination. After successful authentication, files can be transferred back and forth between the server and client. The files are neither encrypted nor compressed.




Q: - For Redhat Linux or Fedora which package is required for FTP service ?

Red Hat Enterprise Linux 5 or FEDORA includes the vsftpd FTP service.
vsftpd-2.0.5-12.el5 (For Redhat)

Q: - Important Configuration file for vsftp server ?

The FTP server uses the /etc/vsftpd/vsftpd.conf configuration file. Using this file, you
can set options for displaying a custom banner message after users log in, setting the
default file permissions for uploaded files, and setting the port on which to listen for
incoming connections.

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.
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 FTP ?

FTP stands for File Transfer Protocol. An FTP server allows clients to connect to it either
anonymously or with a username and password combination. After successful authentication, files can be transferred back and forth between the server and client. The files are neither encrypted nor compressed.
Q: - For Redhat Linux or Fedora which package is required for FTP service ?
Red Hat Enterprise Linux 5 or FEDORA includes the vsftpd FTP service.
vsftpd-2.0.5-12.el5 (For Redhat)

Q: - Important Configuration file for vsftp server ?
The FTP server uses the /etc/vsftpd/vsftpd.conf configuration file. Using this file, you
can set options for displaying a custom banner message after users log in, setting the
default file permissions for uploaded files, and setting the port on which to listen for
incoming connections.

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: - 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: - Is there any way to monitor clients connected to vsftpd?
Yes. We actually have two slightly different methods to monitor vsftpd clients. First, make sure you have enabled the config option, "setproctitle_enable=YES" like in our example above and restart your vsftpd server. Then run the command "watch ps -Cvsftpd -o user, pid, stime, cmd" to watch the processes including ip, username and actions like idle or data retrieval.
Q: - I want to copy multiple files with out prompting for any info, how can I do that one?
ftp -i ftpserver
Q: - Local users cannot log inQ: - Local users cannot log in. How to resolve this issue?. How to resolve this issue?
Check "local_enable=YES" in your /etc/vsftpd/vsftpd. conf to allow local users to log in.

Q: - How to change vsftpd default port?

Set "listen_port" option in "vsftpd.conf"

Q: - How to restrict some IP's not use my FTP server?
Use TCP_WRAPPERS

Q: - Does vsftpd support IPv6?
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: - Is there any way to monitor clients connected to vsftpd?

Yes. We actually have two slightly different methods to monitor vsftpd clients. First, make sure you have enabled the config option, "setproctitle_enable=YES" like in our example above and restart your vsftpd server. Then run the command "watch ps -Cvsftpd -o user, pid, stime, cmd" to watch the processes including ip, username and actions like idle or data retrieval.
Q: - I want to copy multiple files with out prompting for any info, how can I do that one?
ftp -i ftpserver

Q: - Local users cannot log in. How to resolve this issue?

Check "local_enable=YES" in your /etc/vsftpd/vsftpd. conf to allow local users to log in.

Q: - How to change vsftpd default port?

Set "listen_port" option in "vsftpd.conf"

Q: - How to restrict some IP's not use my FTP server?
Use TCP_WRAPPERS

Q: - Does vsftpd support IPv6?

Yes

No comments:

Post a Comment