Introduction:-
FTP
is File Transfer Protocol which is used to transfer files between
server and clients. FTP is most used protocol over internet to
transfer files and it support all the platforms. FTP server works on
client-server architecture. FTP client can easily connect to FTP
server and it can download and upload files.
Requirement:-
- Package = vsftpd
- Port = 20 [ Control Connection ]
21 [ Data
Control ]
- Configuration File = /etc/vsftpd/vsftpd.conf
- Service = vsftpd
- FTP home dirctory = pub
Per
quest on FTP Server:-
- Configure FTP Server IP = 192.168.1.1
- Configure Linux Client IP = 192.168.1.2
- Configure Windows Client IP = 192.168.1.3
- Hostname = server.rootuser.in
- Firewall must be disabled of Server and Client
FTP
Server Side Configuration:-
1] Install
vsftpd package for FTP service
2] Verify
wheather the package is install or not
3]
Edit main configuration file of FTP service. ( Uncomment the
follwoing lines which are in BOLD
format)
#Allow anonymous user to get login to FTP
anonymous_enable=YES
#To allow local users to log in uncommnet this line. local_enable = YES #Uncomment this line if you want local users to be able to upload files. write_enable = YES #To allow uploading for anonymous user uncomment this line. anon_upload_enable=YES #To activate loging of uploading and downloading. xferlog_enbable = YES #The log file of FTP are default store location is; you may change this location xferlog_file=/var/log/vsftpd.log #You may change the default value for timing out an idle session. idle_session_timeout=1200 # You may for some reason decide to limit that amount of users that connect to your
servers at any time, and how many simultaneous connections can be maintained from
each ip address then add following line to the end of file: max_clients=20 max_per_ip=4 :wq 4] Create the resources that are downloaded by anonymous user, and create upload
directory to store uploaded files of public user.
5]
Create one local user to get login to FTP service from client side.
6] Set Selinux
security related options.
7] Finally
start vsftpd service and make it permanent at next reboot
FTP
Client Side Configuration
1] Check
communication wih FTP Server
2] Create some
files to upload.
3] Now try to
connect with anonymous user and password is blan (just press enter).
Username :
anonymous
password
: <┘(press
enter)
Log
in successful.
ftp>
ls
ftp>
cd pub
ftp>
get anup1 # To download single file.
ftp>
get anup* # To download multiple file.
ftp>
cd ..
ftp>
cd upload
ftp>
put file1 # To upload single file.
ftp>
put file* # To upload multiple file.
ftp>
bye
[
Note =
Go to FTP server machine and verify the file which are uploaded under
/var/ftp/upload ]
4]
You can also connect to FTP with local user which we have created
initally. ( i.e. Anup )
[
Note =
Local user must connect to it's home directory on server ]
Username
: anup
password
: anup
Login
Successful.
ftp>
bye
2 comments:
Hi Sir,
This really help me alot.
Two thumbs for you!!!
Thank you.
yes thanks for sharing
Post a Comment