Build an FTP server in Linux
Build an FTP server on Linux.
FTP is short for File Transfer Protocol (File Transfer Protocol ". It is used for controlling two-way transmission of files over the Internet. It is also an Application ). There are different FTP applications based on different operating systems, and all these applications comply with the same protocol to transfer files. During FTP usage, users often encounter two concepts: "Download" and "Upload ).
Generally, the default ftp software included in various linux releases is vsftp. From the recognition of vsftp in each linux release, we can see that vsftp should be a good ftp software.
1. Check and install vsftpd Software
Use the following command #
rpm -qa |grep vsftpd
Zookeeper can check whether vsftpd software is installed. If not, run the YUM command to install the software.
yum install vsftpd -y
2. Start the service
The vsftpd software mainly includes the following commands:
Start ftp command # service vsftpd start stop ftp command # service vsftpd stop restart ftp command # service vsftpd restart
3. vsftpd Configuration
Zookeeper ftp has three configuration files in the/etc/vsftpd/directory:
- Ftpusers: specifies that users cannot access the ftp server.
- User_list indicates that the default account cannot access ftp by default.
- Main configuration file of vsftpd. conf vsftpd
4. Log On As an anonymous user
We will remove the following from the configuration file vsftpd. conf:
anon_upload_enable=YESanon_mkdir_write_enable=YES
You can complete the configuration of anonymous users by using the # sign before the two items. In this case, anonymous users can log on to upload and download files. Remember to restart the service after modifying the configuration file.
5. Create and use non-anonymous accounts
The vsftpd service is associated with system users. For example, we create
#useradd testwww#passwd testwww
6. logon mode (non-vsftp machine)
- Open the browser:
Input on the browser
Ftp: // ip address of the machine where vsftp is located/
Ftp: // ip address of the machine where vsftp is located/; right-click to select Logon