Pages

Tuesday, April 4, 2017

FTP Configuration files and Port numbers

List of Topics

1) What is FTP
2) List of configuration files

3) Types of FTP
4) Sample Commands

1) What is FTP

FTP Linux Booting involves following five steps. BIOS, BOOT LOADER, KERNEL, INIT and RUNLEVEL. Below diagram is the exact procedure how Linux OS is booting. In the following sections we will see about  the below processes the in detail


2) Port Numbers

20 - Used for data channel
21 - Used for command channel

3) List of Configuration files

/etc/vsftpd/vsftpd.conf

/etc/vsftpd.ftpusers - blacklist file, users having entry cant login

/etc/vsftpd.user_listThis file can be configured to either deny access to the users listed or allow the listed users access, depending on whether the userlist_deny directive is set to YES (default) or NO in /etc/vsftpd/vsftpd.conf.

<br> # If userlist_deny=NO, only allow users in this file

# If userlist_deny=YES (default), never allow users in this file, and

/var/ftp/ - The directory containing files served by vsftpd. It also contains the /var/ftp/pub/ directory for anonymous users. Both directories are world-readable, 

ASCII is the default transmission mode of FTP

Changes in ftpusers and user_list doesnt require ftp daemon restart

4) Types of FTP

Active and Passive

Active - Client establishes command channel and Server establishes data channel
Passive - Client establishes both command and data channel.

Active - Client connects from a random unprivileged port number to command port (21) of server . Server then connects to N+1 port number from Data port (20). 

Passive - Client opens two unpriviledge port numbers  n and n+1. rom a random unprivileged port number to command port (21) of server. Client uses PASV command for the server to respond port number. Then again client initiates dat from N+1 port number to Server M port number

5) Sample Commands

cd - 
lcd - 
!dir 
!<command>
prompts
ASCII
Binary
get/mget
put/mput
delete
mls
mdelete

No comments:

Post a Comment