|
Configure linux ftp server step by step guide example and implementation |
| Home | Peer to Peer | CompTIA N+ | CCNA | MCSE | MCITP | RHCE | Interview | Tips n Tricks |
How to configure linux ftp server step by step guide Example and Implementationftp server is used to transfer files between server and clients. All major operating system supports ftp. ftp is the most used protocol over internet to transfer files. Like most Internet operations, FTP works on a client/ server model. FTP client programs can enable users to transfer files to and from a remote system running an FTP server program. Any Linux system can operate as an FTP server. It has to run only the server software—an FTP daemon with the appropriate configuration. Transfers are made between user accounts on client and server systems. A user on the remote system has to log in to an account on a server and can then transfer files to and from that account's directories only. A special kind of user account, named ftp, allows any user to log in to it with the username “anonymous.” This account has its own set of directories and files that are considered public, available to anyone on the network who wants to download them. The numerous FTP sites on the Internet are FTP servers supporting FTP user accounts with anonymous login. Any Linux system can be configured to support anonymous FTP access, turning them into network FTP sites. Such sites can work on an intranet or on the Internet. Configuring the ftp ServerThe vsftpd RPM package is required to configure a Red Hat Enterprise Linux system as an ftp server. If it is not already installed, install it with rpm commands as described in our pervious article. After it is installed, start the service as root with the command service vsftpd start . The system is now an ftp server and can accept connections. To configure the server to automatically start the service at boot time, execute the command chkconfig vsftpd on as root. To stop the server, execute the command service vsftpd stop. To verify that the server is running, use the command service vsftpd status. Configure vsftpd serverIn this example we will configure a vsftpd server and will transfer files from client side. For this example we are using three systems one linux server one linux clients and one windows xp clients. To complete these per quest of ftp server Follow this link
We have configured all these steps in our pervious article. necessary configuration for vsftpd server We suggest you to review that article before start configuration of ssh server. Once you have completed the necessary steps follow this guide.
Three rpm are required to configure ssh server. vsftpd, portmap, xinetd check them if not found then install
Now check vsftpd, portmap, xinetd service in system service it should be on #setup Select System service from list [*]portmap [*]xinetd [*]vsftpd
Now restart xinetd and portmap and vsftpd service
Create a normal user named vinita
Login for this user on other terminal and create a test file On Linux client
ping from ftp server and run ftp
command and give username and password Most commonly commands used on ftp prompt areput To upload files on server get To download files from server mput To upload all files mget To download all files ? To see all available command on ftp prompts cd To change remote directory lcd To change local directory
On window clients
Now go on window clients and create a file. copy con command is used to create files on window.
To save use CTRL+Z
Now ping from ftp server and invoke ftp session from server, login from user account and download as well as uploads files Enable root account for ftp session and set permission on user
By default on vsftpd server root account is disable. You cannot login from root account.
Now we will enable root account for ftp session and same time we will disable our normal user vinita to use ftp sessions.
open file /etc/vsftpd/ftpusers . Users whose name are set in this file will not allowed to login from ftp.
By default this file have an entry for root that why root are not allowed to use ftp. remove root from list and add user vinita
Now remove entry form /etc/vsftpd/user_list files. Users whose names are set in this file are also not allowed to login from ftp even they are not prompt for password.
After saving change in these files restart the vsftpd service
Now go on client system and login from root this time root will login
Now try to login form user vinita she should not prompt form password also How to set login banner for ftp server
To set login banner open /etc/vsftpd/vsftpd.conf file and search for this tag
Go on client system and check banner it will appear before user login |
|||||
|
|
|
|